Animating your Sprites in Unity!

Do you want to make your sprites stand out more then they already do. One of the simplest ways to add flare to you already beautiful assets is to add animation. For today’s tutorial I’m going to use assets I already have established, however if you read along you will be able to apply this technique to your own sprites easily.

To begin, I am using a series of sprites that change color for a powerup I am currently implementing. You will want to select the object you want to add the animation to. Then, at the top of the unity layout you will select window, select animation and then select animation.

This will open the animation window

drag the window down and dock it next to the console window. Make sure the object in question is selected, then click the create button on the animation window. Create a folder for your animations to go into, then name the file appropriately.

Now the animation window is ready to go. with the object selected click the red record button and the window will glow red to indicate that it is recording.

Select all the frames for the animation and drop them into the animation view and all the key frames will be set.

You can test your animation before you are finished by pressing the play button.

When you hit the record button again to finish the animation you will see the animation and a controller. Later, you can set several animation to one controller. You can open the controller to see the animator view and fine tune the animation if you need. Sprite animation by defaults itself to loop.

This is the basics for sprite animation, adding this to your objects in your project will give your game a nice touch. You can use animation for more than this, you could change position, or many other options. Don’t be afraid to experiment with your code, and I’ll see you in the next tutorial.