I have a Camera2D limited to the UI layer, set to orthogonal with depth = 1. It has a UICamera script with the eventType set to 2D UI and an event mask also limited to the UI layer.
I also have a MainCamera that excludes the UI layer, set to perspective with depth = -1. It also has a UICamera script with the eventType set to 3D World and an event mask that excludes the UI layer.
When I click on a 3D gameObject (not on the UI layer), I print out UICamera.current.name, UICamera.current.eventType and UICamera.currentCamera.name.
I get back, in order: "Camera2D", "2D UI", and "MainCamera". I was expecting MainCamera, 3D World and MainCamera. Shouldn't UICamera.current be the mainCamera's UICamera that can see the gameObject, rather than the Camera2D which can't? How can UICamera.current and UICamera.currentCamera refer to 2 separate cameras immediately after an event is received?
EDIT: I've also now printed out the event mask from both UICamera.current and UICamera.currentCamera yielding respectively: UI layer only, and other layers excluding UI. This seems to confirm that the event must be coming from the MainCamera, even though UICamera.current returns Camera2D.