Now, let's learn how to create a simple attack animation clip for our sprite character using keyframes instead of a spritesheet.
Keyframe animation is a complex topic, and we cannot fully address it in a single recipe. Nevertheless, we'll use this opportunity to cover the basic principles so that you can get a grasp of the procedure.
Again, we keep up from where we left. Have your project open and be ready to follow our instructions.
Open the Animation panel by going to Window | Animation, as shown in the following screenshot:
Select Character in Scene. Then click on the drop-down menu in the Animation panel to set attack as the active clip, as shown in this screenshot:
Set a reasonable number of keyframes for the attack clip; 24 frames per seconds is a good starting point. Then hit the recording button to start recording the clip. You can refer to the following screenshot to ensure that you are doing it right: