Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: greenland on August 04, 2014, 10:38:29 PM

Title: Objects randomly jumping into UI Root
Post by: greenland on August 04, 2014, 10:38:29 PM
I've the most mind-bogglingly bizarre error; a key game object is switching it's parent transform to UI Root, and it's layer to NGUI, seemingly at random. I cannot figure out what's causing this to happen, and I've done nothing that even vaguely relates those two objects. The game becomes immediately unplayable in this state.

I have no idea what's going on.
I'm hoping this is specific and weird enough that someone will be able to identify what's causing it, because I can't paste in the area of code that's causing it. :-\
Title: Re: Objects randomly jumping into UI Root
Post by: greenland on August 04, 2014, 10:40:52 PM
Also: I tried deleting UI Root at runtime, hoping that it would give me an object reference error when it occured, but instead, it created a new UI Root GameObject by itself and did the same thing.  >:(
Title: Re: Objects randomly jumping into UI Root
Post by: ArenMook on August 05, 2014, 01:17:30 PM
My guess is you have a widget underneath it. Widgets cause the parent object to be re-paranted to a panel unless there is already a panel present. You can't have stray widgets around. You must make them be children of some UIPanel.
Title: Re: Objects randomly jumping into UI Root
Post by: greenland on August 05, 2014, 03:21:49 PM
My guess is you have a widget underneath it. Widgets cause the parent object to be re-paranted to a panel unless there is already a panel present. You can't have stray widgets around. You must make them be children of some UIPanel.
Thanks! I was adding a HudText behavior and evidently it was doing something derpy. I can fix it now that I've reassurance that i've not yet gone completely mad.