Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Game Whiz 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
-
It appears that using the deprecated SetActiveRecursively for my NGUI UI's solves this issue.
-
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).
-
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.
-
When in doubt, Blame Philâ„¢
:D
-
"When in doubt, Blame Philâ„¢"
Yeah, that should be here: http://www.tasharen.com/forum/index.php?topic=776.0
:)