Author Topic: How to scale a prefab created out of NGUI components?  (Read 3143 times)

astanton81

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
How to scale a prefab created out of NGUI components?
« on: March 19, 2015, 08:26:35 PM »
I have a prefab that I created that is a table cell.  The actual cell size is 700x140.

Inside this prefab, I have a bunch of labels that are anchored using the advanced anchor to position everything how I want.

What I'm wondering is, how do I go about scaling the entire thing?

Say for instance, I want to make it 1/2 the size.  How would I go about doing that so that it scales and all of the anchors and what not also scale accordingly, so that the prefab looks identical just 1/2 the size?

I tried setting (not programmatically, just through the Unity Editor) the scale of the prefab in the game scene to .5 while the game was running, and this didn't work at all as I expected.  I figured had that worked, I would just change the localeScale of the object, but since it didn't work, I didn't try that yet.

So any suggestions?

astanton81

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: How to scale a prefab created out of NGUI components?
« Reply #1 on: March 19, 2015, 10:02:22 PM »
Okay...

So I just tried to programmatically scale it with the localScale on the GameObject transform, and it just worked!

So looks like it actually does work like I was hoping.  It's odd that it doesn't work that way when just editing it in the scene while running the game though.