Implementing 2D animation in Unity
In this section, we will use the tools we explored earlier to implement 2D animation in Unity.
The implementation of 2D animation is different from the implementation of 3D animation. A common implementation technique for 2D animation is to use Sprite Animations, which are Animation Clips that are created for 2D assets.
There are many ways to create Sprite Animations; we can create them directly in the Animation window of the Unity Editor or create them in external tools, such as Aseprite, a popular animation sprite editor, and Piskel, a free online sprite editor.
Here, we use the sprite animation created by an external tool. You can download this asset from Unity Asset Store here: https://assetstore.unity.com/packages/2d/characters/free-pixel-mob-113577.
After downloading the assets, we can find that this image contains many different Sprites, as shown in Figure 4.43. We...