Unity: Animating 2D sprites

Ian Plumpton
2 min readJun 1, 2021

2D sprites are easy to use assets when it comes to building your game, but animating them makes them really stand out. Here’s how:

Creating basic sprite animations is straightforward in Unity; if you have the sprite sheet already sliced, it’s even easier.

We start by selecting our game object then going to Window > Animation > Animation. This opens up the Animation window.

In the animation window, click ‘Create’.

With the gameobject selected, this applies the animation and an animator to it, saving some of the work afterwards. It also creates the animation controller.

Next, in the animation window we click the record icon then shift-select all of the sprites in the animation and drag them into the timeline, before clicking the record icon again.

We can check the animation by pressing play and observing in the scene view.

And our powerup is now animated in the game.

Unity by default will loop an animation. In this instance we want the animation to loop but we can disable this by accessing the animation controller in the hierarchy (double-click) then the animation itself (double-click).

--

--

Ian Plumpton

Software developer in the field of Unity and C#. Passionate about creating and always driven to develop.