Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Tomleung on May 27, 2014, 04:59:24 AM
-
How to click on NGUI UI but not trigger the events of the scene?
It is because I have some touch events on the gameobjects in the scene, if I click on NGUI, if would trigger the scene events too.
How to avoid it?
Thx.
-
If you want that ngui doesn't catch the events you can disable the component UICamera, this will not trigger any event of ngui
-
If you want that ngui doesn't catch the events you can disable the component UICamera, this will not trigger any event of ngui
No, I mean how to avoid trigger the other events but still trigger the UI ?
If I have a cube in the scene, and if I click it, it would destroy.
However, now if the cube and the UI is overlapping and if I click on the UI, it would also destroy the cube too so I need to avoid it.
-
You need to use NGUI events all the way, not check your own Input.Get keys yourself. Check the documentation page for the UICamera. You will need a UICamera script on your main camera as well.