Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Arcanor on March 09, 2014, 09:22:14 AM

Title: recommended way of dealing with scene object selection?
Post by: Arcanor on March 09, 2014, 09:22:14 AM
What is the recommended way of dealing with scene object selection?

If I use Unity's OnMouseOver(), OnMouseDown(), etc. then I don't know if there is any way you disable those events when the player is "supposed" to be interacting with a UI panel.

How do I keep my clicks EITHER in my gui panel, OR on scene objects?
Title: Re: recommended way of dealing with scene object selection?
Post by: ArenMook on March 09, 2014, 09:57:37 AM
You should not be using OnMouse events. You should be using NGUI events -- OnPress(bool isPressed) would be the equivalent.

As long as your camera drawing the objects has a UICamera script attached, all those objects will be capable of receiving those events.
Title: Re: recommended way of dealing with scene object selection?
Post by: Arcanor on March 09, 2014, 10:04:03 AM
Thanks, I will try adding UICamera to my main camera as you suggest.  Hadn't really considered that. :)