Animating Sprites in Unity

Kaitlin Brown
3 min readJul 24, 2023

Animation in Unity is fun and extremely easy! So now that we have gone through how to add sprites in unity let’s take it a step farther! When we first set our triple Shot Powerup it just said “Triple Shot” in red letters. In this article I am going to show you how to spice things up a little bit!

To start off with you will need to create a folder in your assets and name it animations. This will help you find your animations very easily. You can save this as triple shot power up.anim. Once you have don that you will then click on your triple shot power up in your hierarchy to highlight it. Then then click on window.

Once you have done this you will then click on animation.

To make it easier you can dock it beside your console. You will then need to find what you are wanting to animate. In this case it will be the triple shot power up. So under sprites you will click on the drop down arrow beside power ups and then the drop down arrow beside triple shot.

Now you will click on the red record button in your animations. You will then click on the first power up, hold shift, and click on the last power up in that section. This will allow you to select all of the power ups between the first one and the last one. Once you have done this you will drag it into the grid sheet that looks like this…

You can now click on the record button to finish recording. When you do this you will see that in your animations folder it automatically saves it. You will have two things that saved.

  1. Triple Shot Powerup. anim
  2. The triple shot controller

The controller is what controls the logic of our animation. If you click on the triple shot power up in the hierarchy by default, unity will add an animation component with the controller already attached.

If you double click the controller it will open up the animator window.

What this shows is that when you press play the animation is in a constant loop.

This is a simple break down of how to add animation to one of your game objects! Cool right?!

--

--