Author Topic: prevent clicks on objects behind NGUI  (Read 1272 times)

Roots

  • Guest
prevent clicks on objects behind NGUI
« on: December 12, 2013, 10:34:46 PM »
Hi all,

I tried to find this in the forum as i am sure someone must have asked this but coulnd't find it.

My question is what is the easiest / smoothest way to prevent a click in NGUI affect something behind it. E.g. i have an on screen hovering ngui menu and when a player clicks an NGUI button i actually still get the click also hit to the background. e.g. say the player is holding his gun but wants to change his gun type in the menu. When he checks a different gun in the men, he also fires the existing gun (as this is also linked to the left mouse click).

What is easiest, best way to resolve this?

I tried fixing a right hand part of the screen to not respond to mouse clicks but that isn't very scalable into different resolutions etc.

Thanks

Roots

  • Guest
Re: prevent clicks on objects behind NGUI
« Reply #1 on: December 13, 2013, 12:06:14 AM »
I guess simply adding a collider to the background of the menu would do it ...... :-\