- Home /
Sprite on SpriteRenderer not keyframing?
I have a sprite renderer in my scene and using Unity I am trying to create a simple cycle animation from my sprite sheet. To do so I'm simply opening the Animation window, creating a new curve and animation, then attempting to just swap out the sprite on the sprite renderer for a new one. Unfortunately whenever I add a new keyframe to the object all the keys previously on it change to be the new one.
For example, say I have sprites Run_00 through Run_05. Setting Run_00 to the first frame of the animation works fine, but adding a new keyframe of Run_01 will change the first keyframe to Run_01 as well.
This is pretty infuriating, and I just want to know if I'm doing something wrong. I've tested making a new positional animation and it worked fine, so I'm not sure whats wrong here. Thanks for any help you might be able to provide!
It's also worth noting that the actual images of the sprites in the animation window are correct. They're just not playing for some reason. Even in the preview window.
When you choose Add Curve, are you then selecting Sprite Renderer>Sprite+? Once you do that, simply expand the sprite sheet in your prefab folder and drag the sprites you want onto the timeline, and position as needed.
I tried exactly that. As I said in my comment above, the correct frames are being shown in the dope sheet, they just aren't playing when I hit play (in either the animation window or at the top of Unity). = /
And I DO have Play Automatically checked (not that that matters for playing from the animation window).
Answer by CorporalAl · Oct 08, 2014 at 02:32 PM
Try selecting all the sprites in your asset window and dragging them to your Hierarchy window. This will create a new animation in your scene that you can add frames to.
Your answer
Follow this Question
Related Questions
Changing one keyframe in my animation changes all of them 2 Answers
Unity 4.3 - Animating SpriteRenderer.Sprite With Legacy Animation 2 Answers
Change sprite in a sprite renderer with an animation 0 Answers
Platform Grills Scroll Animation - 2D Game 0 Answers
Translucent sprites appear solid 0 Answers