I have a project with several “game” cameras, each one showing your character from a different perspective. These cameras are all visible simultaneously using a script that sets their pixelRects, so they don’t overlap. Then, I have a bunch of UI elements on top of that, broken into two canvases. Both canvases are Screen Space - Camera to take advantage of some depth effects.
All of the “game” cameras have a Depth property of 0 (zero). The two UI cameras (there’s one for each canvas) are set to Depths 12 and 13, respectively. Before 5.6, this worked as expected: the UI rendered on top of all of the game views, and the UI on the Camera with 13-depth rendered on top of the UI with 12-depth.
Ever since upgrading to 5.6, Unity renders the 0-depth cameras on top of the UI elements, blocking them out. I have checked using Frame Debugger and, yes, Unity really is drawing the 0-depth cameras on top of the 12- and 13-depth cameras. But the 12- and 13-depth camera still render in the right order vis-a-vis each other. In other words, the 13-depth UI elements are still on top of the 12-depth UI elements, but the 0-depth game camera are on top of all of them.
I have changed the 0-depth cameras to all sort of other less-than-12 depth settings, negative and positive, with no change. (Also no change when I set the 0-depth cameras to 12 or higher.)
Any suggestions? Is this a bug? Is there a way I can force Unity to re-examine the camera depths and render them in the right order?