Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Canvas do not respect sorting layer when using different camera in multiple scene loaded additively

Discussion in 'Immediate Mode GUI (IMGUI)' started by maeln, Feb 3, 2022.

  1. maeln

    maeln

    Joined:
    Oct 20, 2021
    Posts:
    11
    Hi !

    I have a specific use-case where I load multiple scene additively. Each scene has one or more canvas in "screen space - camera" mode using its scene camera. I use sorting layer to sort my different canvas in the same scene.

    But when I load one scene additively, they don't seem to respect the sorting layer. Let's say I have a scene S1 with a canvas C1 on the sorting layer L1, when I load scene S2 on top of it with a canvas C2 set to the sorting layer L2, it doesn't not matter if L1 is lower or above L2, C2 will always appear on top of C1.

    Is there a way to fix this ? Can I use a "common" camera that will be store in a common scene ?