Galaxy Shooter 2D — Creating Sprite animations #7

Using the Animation window to give life to our game entities

In the previous article, I implemented a new powerup to my game: Triple Shot! Today, I’m going to show you how I animated the powerup, and how you can animate anything you want in Unity!

Creating an Animator Controller

Before we begin creating or adding our animations, the GameObject needs to have an Animator Component and a Controller. Those two are necessary to make animations work and set the animation behaviors. There is an easy way to get both right away:

  • Add the Animator Component to the GameObject to animate.
  • Open the Animation Window, and create an animation.
  • A File Explorer window will pop up and ask you to select a folder to store that new animation. Once you have selected one, click on “Save”.
  • The Animation window will change, and if you check the folder where you saved the animation, you’ll see the animation and the Animator controller. Additionally, the Animator component will auto-assign that new Animator controller so you don’t have to do anything.

Adding keyframes

I have a set of sprites that make for a good animation sequence, and to fully animate the powerup, I just have to select the sprites, and drag and drop them in the Animation window.

The Animation windows has even more functionality that will help you create awesome animations!

And that’s it!

It’s that simple, really. However, I skipped the Animator window, which is another whole topic on its own. Perhaps in a future article, I will talk about it and the underlying complexity that it has.

I am a recently graduated Game Designer with strong knowledge of the Unity Engine! You can check my game “Noise Hunters” on Steam!

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