Animating sprites
Creating and using animations for sprites is a bit easier than other parts of the development stage. By using animations and tools to animate our game, we have the ability to breathe some life into it. Let's start by creating a running animation for our player. There are two ways of creating animations in Unity: automatic clip creation and manual clip creation.
Automatic clip creation
This is the recommended method for creating 2D animations. Here, Unity is able to create the entire animation for you with a single click.
If you navigate in the Project Panel to Platformer Pack | Player | p1_walk, you can find an animation sheet as a single file p1_walk.png
and a folder of a PNG image for each frame of the animation. We will use the latter. The reason for this is because the single sprite sheet will not work perfectly as it is not optimized for Unity.
In the Project Panel, create a new folder and rename it as Animations
. Then, select all the JPG images in Platformer Pack...