UI Elements Order in Layer

Hello everyone! I saw a lot of people wanting to change the UI Elements order, not only to put the text above another and something like this, but too about putting the text above sprites and so on. This works for all the cases.

To Order the UI elements you need to:

  1. Go to the Canvas Game Object:
    6732667--775093--upload_2021-1-16_20-18-15.png

  2. In Canvas Component you need to turn the Render Mode from Screen Space - Overlay to Screen Space - Camera:
    6732667--775096--upload_2021-1-16_20-22-32.png

  3. Then you will see that the Sorting Layer and Order in Layer appeared. So you can change the Sorting Layer to the layer that you want to, and the order in that layer:
    6732667--775105--upload_2021-1-16_20-29-3.png

6732667--775111--upload_2021-1-16_20-29-34.png

6732667--775114--upload_2021-1-16_20-30-41.png

I’ll be happy to reply your questions. Thanks!

3 Likes

Order Number of UI elements is so important.
Was raycasting into oblivion checking the Event Systems lower right bottom box on play. Button was driving me crazy.