Author Topic: 2.1.6 broke my UI in Unity 4.0b7  (Read 2555 times)

Game Whiz

  • Guest
2.1.6 broke my UI in Unity 4.0b7
« on: September 03, 2012, 10:45:25 AM »
Hi,

Just updated from 2.1.4 to 2.1.6 and UI events are not being detected in objects that start deactivated and get activated in runtime.

My UI has several NGUI UI's that I activate/deactivate when needed. When the game starts everything works fine, but as soon as I deactivate the starting GUI and activate another one, the newly activated one doesn't respond to any input.

How can I fix this?

Best regards,
Alex

Game Whiz

  • Guest
Re: 2.1.6 broke my UI in Unity 4.0b7
« Reply #1 on: September 03, 2012, 10:53:32 AM »
It appears that using the deprecated SetActiveRecursively for my NGUI UI's solves this issue.

Game Whiz

  • Guest
Re: 2.1.6 broke my UI in Unity 4.0b7
« Reply #2 on: September 04, 2012, 08:07:11 AM »
Aren, there's a bug in NGUITools.GetActive. You should return go.activeInHierarchy instead of go.activeSelf, since activeSelf may be true, even though the object is deactivated (e.g. in my case a game object's parent was set to false and it was returning true, causing my gui to stop working).

PhilipC

  • Guest
Re: 2.1.6 broke my UI in Unity 4.0b7
« Reply #3 on: September 04, 2012, 08:32:54 AM »
Yea I wasnt 100% sure which one was going to work properly as Unity's documentation was not so good on the subject. I tried with the .activeSelf and everything seemed to be working as expected so wasnt to worried about it.

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.1.6 broke my UI in Unity 4.0b7
« Reply #4 on: September 04, 2012, 04:04:48 PM »
When in doubt, Blame Philâ„¢

:D

Game Whiz

  • Guest
Re: 2.1.6 broke my UI in Unity 4.0b7
« Reply #5 on: September 04, 2012, 05:02:00 PM »
"When in doubt, Blame Philâ„¢"

Yeah, that should be here: http://www.tasharen.com/forum/index.php?topic=776.0

:)