- Home /
How do I make a sprite show up as part of the canvas?
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?
Answer by Munchy2007 · Jun 03, 2016 at 09:54 AM
Don't add the sprite to the Canvas directly, add a UI.Image instead and assign the sprite to the Image.sprite property.
Your answer
Follow this Question
Related Questions
Canvas image sprite change from script 0 Answers
World canvas sprite transform script 1 Answer
Problem in text 3 Answers
[Simple] All sprites are showing, Canvas UI 0 Answers
How to change UI image render order dynamically on runtime 1 Answer