Animating Sprites in Unity

Objective: Add animations to our Power Ups.

Animating sprites adds an amazing visual effect to your game. With Unity, it is easy to add animations to your 2D sprites. I will guide you through the process. First, you need to have your 2D sprite sliced up into multiple images, each a little different, as shown below. When searching of game assets, just make sure the animations are included.

Now that we have the sprite spliced up, we can add the animation to the game object. This is done by:

  1. Moving the prefab to the scene view and highlighting it
  2. Click on window, then animation, then animation. This will open the animation window
  3. Click on create animation, give the animation a name, then click save
  4. In the animation, window click on the record button (the red circle) to start the recording
  5. Highlight all the slices of the sprite and drag it to the animation window. Then click the record button to stop the recording.

That is it, now the animation is attached to the game object.

The last thing to do is in the inspector, click on the overrides and save the changes to the prefab.




Unity / C# Game developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Case study of companies that got benefitted from AWS:

Do we need to fight fire with fire?

Running my first application on Knative

Running GUI’s with Docker on Mac OS X

How To Tackle System Design Interview for File Sharing Service Like Dropbox Or Google Drive

Introducing Text Extensions for Pandas

Active Record is the bestest thingy in the WHOLE WIDE WORLD (slash web)

How to do the KYC — Terraformer

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
Bill Rislov

Bill Rislov

Unity / C# Game developer

More from Medium

Loading Scenes In Unity

Adding Challenge — Limited Ammo Count

Day 109: Show End Scene

Scripting our greybox prototype