Problems with camera rendering order

I’ve been working on this for awhile now and it seems there is a problem with the cameras.
My goal is to get a working background image for the program I have created.

My main camera:
Layer = Default
Depth = 0
Clear flags = Depth only
Culling mask = Everything except “UI” layer
Background camera
Layer = Default
Depth = -1
Clear flags = Solid color
Culling mask = “UI” layer

The image I’m using is inside a canvas. The canvas and the image are in layer “UI.”

This should make the background camera render the picture behind the main camera, but it doesn’t.
Also, when I click either camera, neither show any UI elements in the camera preview window.

Have you tried using the frame debugger to see whats happening? It’s in the window menu and will show you exactly what is happening for each draw call. It will help diagnose the issue in more depth.

I just did, and it says that the canvas that contains the background is being rendered after the main camera.

Here’s the frame debugger after everything is rendered:

ahh

Overlay canvas does not render via cameras, it goes direct do screen. You want to have a ‘Screen Space - Camera’ canvas.

1 Like

Ok. It works now. Thanks for you help!