Animating Sprites in Unity

To avoid having our in game sprites looking boring and static, Unity allows us to easily animate them.

We can do this through the Animation window —

Locating, opening and docking the Animation window

With the GameObject we want to animate selected, we can create a new animation from the animation window. Find or create an appropriate location within your project’s file structure for the animation and give it a name.

Create new animation files

This process will automatically place an Animator component on the selected GameObject and link it to your newly created animation file.

Creating the animation effect

With all the links and components in place, we can hit ‘Record’ in the animation window and drag in the sprite files that make up our animation effect. The speed of the animation can be controlled by adjusting the ‘Samples’ field.

Ooooh… flashy

This is a very basic implementation of the Unity Animation system. There are many more features to it which I’m sure I’ll get to in a later article.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store