- Home /
2d Animation not rendering in front of background sprite in spite of sorting layers
Hi!
I created a nifty animation from a spritesheet of a character blinking - I created a prefab from the gameobject with its animator and the script to run the blinking animation intermittently.
I have a canvas, it has sprite to render a background (it's a very UI-focused game so I figured this was okay, made resizing the background easier).
I'm trying to add my prefab to my scene but it always ends up rendering behind the background, even if they both belong to the canvas and even if I've created 2 sorting layers to put the character in the front.
I've googled the crap out of this for a couple of hours now and haven't been able to figure out what I'm doing wrong. Any help would be greatly appreciated!
Answer by TempestMia · Mar 29, 2016 at 05:01 AM
WELL! I'm a noob. Can't use a Sprite / Sprite Renderer on a canvas. I had to remake my Prefab with unity canvas' Image instead. That works.