Cause and mechanism
How UI overlaps 3D objects depends on the Canvas render mode. Check order within the Canvas, Renderer sorting, and depth testing separately. A CanvasGroup groups UI behavior but does not set Sorting Order. Moving the Z position alone cannot solve every case, so start by identifying the Canvas mode.
Check and correct the setup
- To interleave background UI, a 3D effect, and foreground UI, use separate canvases/cameras or texture composition.
Inspect input targets in front - For nested canvases, configure Override Sorting and orders explicitly; check particle sorting and render queues too.
Inspect input targets in front - Check camera-relative depth, clip planes, plane distance, and depth tests/writes in Frame Debugger.
Inspect input targets in front
Limits and verification
Sorting changes do not necessarily override depth occlusion. Keep CanvasGroup opacity/raycast settings separate from rendering order.
A focused diagnostic setup
Use one background image, one particle effect and one foreground button. State the required background/effect/button order explicitly.
Test in this order
- Verify UI ordering alone and split canvases if needed.
Inspect input targets in front - Restore the particles and inspect actual Canvas/Renderer draw order.
Inspect input targets in front - Vary distance and view to test depth, plane distance and queues.
Inspect input targets in front
Interpret the result
Correct draw order can still fail depth testing. Revisit materials and composition instead of endlessly raising Order. A dedicated camera/RenderTexture is another option for embedded 3D previews.