I’m sorry this has been asked before, but none of the solutions have worked for me. I made a simple background in photoshop and saved it as a PSD. Unity automatically set it as a Sprite (2D & UI) under import settings. When I dragged it in the hiecharchy, I can see it in my scene view but NOT my game view.
I tried putting the sprite in its own layer, making the layer appear first, and also setting the “Order in Layer” to a value such as 5. No dice.
In the scene view, drag the main camera over the sprite.
Also make sure that the camera’s z value is lower than the sprite’s z value in the transform’s position.
“Also make sure that the camera’s z value is lower than the sprite’s z value in the transform’s position” That’s what did it for me. I had an Empty object with Sprite child. I set the z value for the Sprite to be 0 but not the Empty object. Once I fixed the parent object then I was able to see it.
My camera is set to -10 and all sprites to 0. The background shows up but the character does not. The layers are set in the correct order.
Edit: It looks like when I enter play mode the z coordinates of the player and camera reset to bad values. I don’t know why. Suspicious it may be a bug in one of my scripts. Will look into it further.
Edit: In the script that makes the camera follow the player, I had it attached mistakenly to the player in addition to the camera (should be to the camera only), so the z value of the character was getting messed up. Removing the script component from the player fixed the problem!
Takeaway: Make sure your scripts are not modifying your z-positions or layering during runtime!