How is click/touch input handled when using different layers?

Unity n00b here, just getting through the basics right now. I’m using NGUI to get my UI to render on top of a few 3D objects. I currently have two camera objects in my scene — one that renders the 3D objects in the scene (cull mask set to “Default” layer, not “Everything”), and then the camera provided by NGUI.

I’ve put the NGUI root in a custom-declared “NGUI Layer” that I made. I applied this recursively so it also put the NGUI camera in this layer.

I made the standard camera object not include “Everything” but instead “Default”.

Rendering-wise everything looks good, but I cannot click on the NGUI widgets, or detect hover events. It clicks fine if I keep everything in the same layer (but the rendering isn’t how I’d like). I figure this must be a layer-related issue. Can someone explain to me how the basics of the layer-input relationship in Unity?

Thanks!!

From a post by NGUI’s author on Unity forums, replying to a similar problem :

Edit → Project Settings → Physics, check “Raycast Hit Triggers”.

I got a solution from ArenMook (NGUI creator) that seems to work. Click on NGUI’s camera object, then in the script component for UICamera, change the Event Receiver Mask to match whichever layer you have your NGUI widgets on. That should make sure the right clicks/input is being received. Seems to work for me! More details here —> http://forum.unity3d.com/threads/114833-NGUI-(Next-Gen-UI)-demo-amp-final-feedback-request?p=880566&viewfull=1#post880566

You have to make sure that in your UICamera the “Event Receiver Mask” ist set to the correct layer.