Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: aholla on August 27, 2014, 05:56:59 AM

Title: Collider on Top?
Post by: aholla on August 27, 2014, 05:56:59 AM
Hi, I would like to add a Box Collider to a game object which has a Unity2DSprite (not ngui) that covers the whole screen and therefore disables all of the NGUI elements.

Currently the NGUI buttons still receive the clicks although the is a collider above it.

What do i need to do to make this collider capture the events so that ngui does not?

Thanks
Title: Re: Collider on Top?
Post by: ArenMook on August 28, 2014, 08:15:21 PM
When the UI camera is set to UI event mode, all raycast results are sorted by widget depth. Unity2D sprite doesn't have a widget component, so it's going to be dead last.

The only way to resolve this properly is to use an NGUI widget covering the screen instead. ALT+SHIFT+W, ALT+SHIFT+C.