UI element on Canvas not showing in game

I’m trying to get my hearts to display anchored to the upper right hand corner and I have set them to be anchored there. My score is displaying fine as well as the game over text in the center, but when I bring the game into play mode, the lives never appear in the upper left hand corner…


My first guess is that your anchor settings are wrong either on the hearts or their parent RectTransform. Anchor them to the top-left so they stay in that position no matter the resolution. It might also be a good idea to Ctrl+Shift+P and look in the Scene View to see where they’re actually appearing offscreen.

1 Like

After playing with it for a while I found out it’s because I was using sprite rendered instead of images. Not sure why this fixed it though

You can’t use SpriteRenderers within a Canvas. They’re not made to play well with one another. Images are the standard way to display a sprite on a Canvas.

2 Likes