How to make canvas be layered behind my sprite?

I’m working on a 2D game and I want to have my score counter Text object (a child of the canvas) appear behind my obstacle sprites so that it doesn’t distract the player too much.

Currently I have already set the Sorting Layer for my obstacle sprites and the Text object. The Text object is on a sorting layer below the obstacle sprites but the Text object still appears on top of the obstacle sprites in-game.

I’m still getting used to this new UI system that Unity has so I’m not sure how to make this work. Anyone know how to fix this issue?

Thanks!

1 Answer

1

You can set the render mode of the canvas to world space. So the canvas becomes a normal Game object that can be layered.

Thanks for the answer. When I set the render mode of my canvas to world space, my UI Text disappears. I have tried setting it on a sorting layer that is above all my sprites but I still don't see my Text elements. Any ideas?