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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Sorting two canvas with different render mode

Discussion in 'UGUI & TextMesh Pro' started by Turru, Sep 16, 2016.

  1. Turru

    Turru

    Joined:
    Mar 9, 2015
    Posts:
    3
    Hello everyone.
    case:
    A first canvas with render mode "Screen Space - Overlay"
    one second canvas with render mode "Screen Space - Camera"

    what I want is that the second canvas (Screen space - Camera) is ordered above the first canvas.

    what I want is that the second canvas cover the first.

    Sorry for my English . Thanks a lot!!
     

    Attached Files:

  2. IzzySoft

    IzzySoft

    Joined:
    Feb 11, 2013
    Posts:
    376
    If i'm not misremembering what others have said, Screen Space - Overlay is always drawn after any Cameras, even the Screen Space - Camera.
     
    Turru likes this.
  3. Turru

    Turru

    Joined:
    Mar 9, 2015
    Posts:
    3
    Thanks for you answer.
    then there is no way to sort ????
     
    Last edited: Sep 16, 2016
  4. TienLP

    TienLP

    Joined:
    Apr 1, 2013
    Posts:
    5
    First of all I don't know why you have to use 2 different types of screen space. Screen Space Overlay - just like its name - will draw above everything.

    If you could change both of them to Screen Space - Camera and use 2 cameras for that, with clear flags set to Depth Only and the second one has a greater depth value than the first, you can sort it
     
    Turru likes this.
  5. Turru

    Turru

    Joined:
    Mar 9, 2015
    Posts:
    3
    Thanks for your answer.
    Well, I have two canvas by initial ignorance.
    I have to change the design of the canvas to fit these responses.
    Many thanks
     
  6. MatiasWainstein

    MatiasWainstein

    Joined:
    Feb 14, 2018
    Posts:
    3
    I know this thread is from way back back maybe someone can help me here. I'm creating an interactive map which is only a part of my whole screen. Meaning I want to zoom in on a window within a window child of the first one. I'm checking about using two canvases and two cameras. What's the best way to do this?