Author Topic: Automatic UIRoot composition, how to disable it?  (Read 1324 times)

sebas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Automatic UIRoot composition, how to disable it?
« on: August 15, 2014, 12:12:46 PM »
Hi,

I updated to the latest NGUI and I noticed a new unexpected behaviour, NGUI now somehow tries to rearrange the hierarchy, probably to find the optimal combinations of UIRoot and Panels.

Ok I am sure currently our setup is a mess, but we cannot work on it. Is there a way to disable this automatically rearrangement?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Automatic UIRoot composition, how to disable it?
« Reply #1 on: August 16, 2014, 09:00:39 AM »
Rearrange the hierarchy how? The only time NGUI will try to reposition widgets is when there is no panel above the widget, and it has to find or create one. Never use Instantiate() for that reason, and always use NGUITools.AddChild instead.