I'm currently trying to implement a UI that will overlay a scene and follow a scene's main camera, but I'm running into some issues. When I set canvas's mode to Screen Space - Camera
, the Z
position of the canvas is always set to 89.5
, which is behind all of the objects that are generated into my scene, making the canvas and the UI elements on it completely invisible to the player.
This is the game preview before running the game, with the UI elements clearly visible:
This is the game while it's running in the editor, with the UI elements not visible at all:
This is what my hierarchy looks like:
This is what the properties for the canvas look like:
Why is my UI not visible when I run my game? How can I fix this?