Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Maxii on October 04, 2014, 03:35:22 PM
-
I'm looking for a way to be notified when a widget or panel transitions into/outof camera line of sight like MeshRenderer.OnBecameVisible/Invisible does for meshes. As UISprite doesn't use a MeshRenderer, I don't have that notification available to me.
-
UIWidget.isVisible tells you whether it's visible, but there is no delegate for this. You have to watch for it changing.
-
Would you consider a feature request then?
-
It seems like this would add overhead to every single widget, even though in 99.9% of the use cases this isn't going to be used. I'd say this is best as an additional script attached to whatever you want to be tracking this kind of thing.
-
Thanks for considering it. I take it you are referring to a script that polls isVisible during Update?
-
I'd put it in a coroutine, but yes.