Author Topic: Grouping Widgets  (Read 5625 times)

stevej

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 117
    • View Profile
Grouping Widgets
« on: July 03, 2012, 05:27:10 AM »
I'm trying to figure out the correct way to group widgets together.

For example, say I have "Window", "Button1", "Button2". What I basically want to do is make Button1 and Button2 children of the Window so I can move it around and the buttons stay in place. When I do this, NGUI pulls them back out again and warns me that I should create a GameObject to group them under. So, I create a GameObject and place three items under that, but all of the scales go crazy at that point and everything gets kinda messed up.

Feels like there's a step I'm missing or something?

stevej

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: Grouping Widgets
« Reply #1 on: July 03, 2012, 05:42:55 AM »
Just an update - it actually just seems to be SlicedSprites that don't like being parented to another GameObject. They become HUGE. A normal sprite though is fine.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grouping Widgets
« Reply #2 on: July 03, 2012, 01:47:23 PM »
Scales of all objects leading up to your widgets should be (1, 1, 1), with the lone exception of UIRoot.

stevej

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: Grouping Widgets
« Reply #3 on: July 03, 2012, 07:25:29 PM »
Thanks - will experiment some more. I did notice that the empty GameObject, when dragged in to be a child of the panel, was losing it's 1,1,1 scale and taking on 768,768.768 which is the height set in UIRoot. I'll try changing it back to 1,1,1 at that point and then dragging the child items into it.