So I have a sprite which I am trying to show up as part of the canvas–I want the canvas as an overlay to the scene, where the player can move through the world and the canvas stays the same. I’m using the canvas render mode therefore as Screen Space - Overlay, and I’ve made the sprite a child of the canvas, as well as added a Canvas Renderer to the sprite. When I play the game though, the sprite does not show up as part of the canvas, but rather shows up as a gameobject in the world. How do I get it so that the sprite will be part of the canvas?
1 Answer
1Don’t add the sprite to the Canvas directly, add a UI.Image instead and assign the sprite to the Image.sprite property.
Simply accept the answer and It'll be enough. I think for camera animations (unless it's a cutscene) it's always better to use scripted animations than "baked". You are far more flexible.
– Zodiarc
IT WORKS!. thanks a lot. i was struggeling for weeks. how can i thank you for your time and effort? btw i used legacy animations to animate the rotation.
– Omwro