Search Unity

Sprite displayed behind UI.

Discussion in '2D' started by SuchASaltyLemon, Mar 1, 2019.

  1. SuchASaltyLemon

    SuchASaltyLemon

    Joined:
    Mar 1, 2019
    Posts:
    10
    Hello, everyone. I am currently facing an issue that is stopping further development I am making in a game for a school project. The sprite I am using is a cursor that is supposed to be able to select a button. However, the button is covering the cursor whenever I go to click it. I have tried sorting layers, moving their position on the Zaxis, nothing seems to work. If any information is needed, please ask.


    Code.PNG Behind UI.PNG
    . Hierarchy.PNG Layers.PNG
     
  2. Nivbot

    Nivbot

    Joined:
    Mar 21, 2015
    Posts:
    65
    Switch the cursor and ui layer order. The last one is put in front the previous one.
     
  3. SuchASaltyLemon

    SuchASaltyLemon

    Joined:
    Mar 1, 2019
    Posts:
    10
    Thanks for the help. I am new to working with these layers. I thought the ones closest to default were prioritized.
     
  4. Nivbot

    Nivbot

    Joined:
    Mar 21, 2015
    Posts:
    65
    Nope goes from low to high and not a problem. We've all been there.