Unity2D background image ui element covering player sprite and score(Text ui element)

I have a Canvas and it has 2 children: Score and Background Image. I have one Sprite GO called Player.
The player sprite and score text are both not shown in the game scene-as if the background image are blocking it. Any suggestions? I tried changing the sort order.

Are you talking about an object in the scene the player interacts with to load another scene/level? like an object the player clicks to start a mission? ...because regular items like health pickups, weapons etc. are interactive no matter what scene they are in. The player is able to interact with items in any scene.

1 Answer

1

I had the same problem. These things fixed it for me:

  1. Right click the image in question and click “copy”
  2. Delete the original image
  3. Right click in the hierarchy and click “paste”

If that doesn’t work, try checking your z-depth, making sure it is in “UI” layer, or restarting unity.

I hope this helps!

[UPDATE]

I did some research, and it turns out that the order of items in the hierarchy determines the ordering that UI elements are rendered. Any elements that should be in the background need to come BEFORE the other elements.