Building Simple Sprite Animations In Unity

The unity animation system is pretty straightforward. Unlike some other engines you can’t actually build or edit sprites in Unity (at least as far as I know). Instead you have to create your keyframes outside of the editor using any software you like, and import them as sprites to string together into animations inside of Unity.

You can import the first frame of your basic idle as a texture and set the Type to Sprite to place it in the scene before importing the rest of your keyframes as an animation

Once you have a set of sprites, making them into an animation is as easy as opening up the Animation panel and clicking the Create button.

Select your the object you want to animate and click Create to import your keyframe images
Once your keyframes are imported you can set them up on a pretty standard keyframe animation timeline

The layout for building keyframe animations should seem pretty familiar if you’ve used any animation software previously, and it doesn’t take long at all to get a basic animation working. The more complex part comes in the Animator panel.

The Animator panel handles transitions between animations

While a bit confusing, the Animation panel is for setting up keyframes of an animation, while the Animator panel sets up the flow of animations based on a set of parameters. For 2D animation this is simply the rules to go from one flipbook to another, but in 3D this is where you set up blend trees and get a lot of the nuance to how to make characters move correctly. For this reason 2D is a little bit easier, but either way, working with animations in Unity isn’t something you should be intimidated by, even if you’ve never worked with animations before.