Query:
In Unity, I’ve a number of additive scenes, every with its personal digital camera and Canvas. The Canvases are set to Display House – Overlay and use their respective scene cameras. All Canvases are on the Default layer with the identical Order in Layer (0). How can I programmatically or manually management the rendering order of those Canvases to make sure they’re displayed accurately when a number of additive scenes are loaded concurrently?
Situation Breakdown :
Scene 1 (Loading Scene):
Digital camera 1: Fundamental digital camera for the loading scene.
Canvas: "Loading" | Render Mode: Display House - Overlay (utilizing Digital camera 1) | Layer: Default | Order in Layer: 0.
Scene 2 (Fundamental Gameplay Scene - Additive):
Digital camera 2: Fundamental digital camera for the gameplay scene.
Canvas: "Fundamental Gameplay" | Render Mode: Display House - Overlay (utilizing Digital camera 2) | Layer: Default | Order in Layer: 0.
Scene 3 (Popup Scene - Additive):
Digital camera 3: Digital camera for the popup scene.
Canvas: "Popup" | Render Mode: Display House - Overlay (utilizing Digital camera 3) | Layer: Default | Order in Layer: 0.
Downside :
When a number of additive scenes are loaded, all Canvases are set to Display House – Overlay and use their respective cameras. Since they share the identical Order in Layer (0) and are on the Default layer, their rendering order turns into unpredictable, resulting in potential overlap or incorrect show.
Necessities :
- Management the rendering order of Canvases throughout a number of additive
scenes. - Make sure that particular Canvases (e.g., “Popup”) at all times render
on high of others (e.g., “Fundamental Gameplay” or “Loading”) - Obtain this programmatically or by way of guide configuration.