- Home /
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.
Answer by hsoj955 · Nov 17, 2016 at 02:23 PM
I had the same problem. These things fixed it for me:
Right click the image in question and click "copy"
Delete the original image
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612081901im_/https://answers.unity.com/themes/thub/images/avi.jpg)