Hello,
I have a problem that I hope you all can help me with.
There is a complex UI I want to make. It involves a Canvas with usual 2D UI elements (grid layouts, buttons, etc) as children of it using regular rect transforms and sprites and then a 3D mesh with which the user may interact. I have a 3D mesh because the UI element is not a square and the visualization of the UI control requires shaders and such. The UI’s canvas is in screen space - camera mode. One oddity is that the 3D mesh’s regular Transform object is a child of a Rect Transform in the hierarchy under the canvas. The 3D
object has been transformed to be infront of the 2D UI elements.
I have a Physics Raycaster to the Camera and a Graphics Raycaster to the Canvas.
I’ve put everything on what appears to be the correct layers (with apparently correct masks), told the casters about them, and such and used the IPointerDownHandler, etc interfaces on the 3D mesh script, etc, etc.
My problem is that EITHER the Physics Raycaster works, OR the Graphics Raycaster works. It seems I cannot get both of them working together.
And, this seems to happen no matter who the parent of the 3D mesh is. If the Graphics Caster is enabled, the Physics caster seems to stop working. If the Graphics Caster is disabled, the Physics Caster works and the 3D Mesh’s script sees the IPointerDownHandler events, etc.
I’m using Unity 5.4.3f1 on a mac.
Any suggestions would be great. Thank you!