One of the most common issues Unity beginners have is that certain graphic/UI elements disappear when you hit the play button to render the scene.
The reason this happens is almost always because you accidentally manipulated the transform position’s z-axis to a minus value that is lower than your camera’s.
What happens is that your scene camera has a default z-axis value of -10 (at least in 2D). So if one of your UI elements has a transform position z-axis value that is lower such as -11, then it’s positioned behind the camera. Obviously, the camera can’t render and display elements that are positioned behind it!
- In 3D, change your disappearing UI elements position z-axis value to a value higher than your scene camera.
- In 2D just set it to 0 (you generally don’t need the z-axis for 2D games).