Author Topic: Objects randomly jumping into UI Root  (Read 4618 times)

greenland

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
Objects randomly jumping into UI Root
« 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. :-\

greenland

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Objects randomly jumping into UI Root
« Reply #1 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.  >:(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Objects randomly jumping into UI Root
« Reply #2 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.

greenland

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Objects randomly jumping into UI Root
« Reply #3 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.