Search Unity

Problem with layers

Discussion in '2D' started by amitbu, Aug 8, 2019.

  1. amitbu

    amitbu

    Joined:
    May 16, 2019
    Posts:
    12
    Hi, In my 2d game, I have some kind of a menu at the top of the screen =>


    InkedInkedCapture_LI2.jpg

    Now, Because this menu appears in almost every screen, I decided to create a canvas for it (See picture Above) so if I'll need to change something, I won't need to change it in every single screen.
    The problem is that I had to set the canvas to 5 in the "order in layer" field and now when the player sees the "Win Screen" (See picture Above), the top menu goes through it, which is not my desire.
    I tried to set the "Win Screen" to a new layer with the "Tags and Layers" tab (See picture below)
    but for some reason it's not working.
    What am I doing wrong?

    Capture.PNG


    Capture2.PNG
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Order in Layer
    is for sorting layers:
    sketch-1565272140122.png
     
  3. amitbu

    amitbu

    Joined:
    May 16, 2019
    Posts:
    12
    Hey, thanks for the reply.
    I added a layer in "Sorting Layers" but what now?
    I mean, how can I tell unity that "Win Screen" in on that layer?
    Edit: ok I tried to add a "Sorting Group" component to the "Win Screen" but still not changing.
     
    Last edited: Aug 8, 2019