Creating animation clips from sprite sheet sequences
The traditional method of animation involved hand-drawing many images, each slightly different, which were displayed quickly frame by frame to give the appearance of movement. For computer game animation, the term sprite sheet is given to an image file that contains one or more sequences of sprite frames. Unity provides tools to break up individual sprite images into large sprite sheet files so that individual frames, or sub-sequences of frames, can be used to create animation clips that can become states in Animator Controller State Machines. In this recipe, we’ll import and break up an open source monster sprite sheet into three animation clips for Idle, Attack, and Death, as follows:
Figure 8.37: An example of a sprite sheet
Getting ready
For all the recipes in this chapter, we have prepared the sprite images you need in the 08_06
folder. Many thanks to Rosswet Mobile for making these sprites available...