Bringing the NPC to life
This NPC will be present in our main world, and when the players want to change their appearance, they will have to come back to our nice village; endearing, isn’t it? We will create a Prefab that houses the character and its functionalities.
To achieve this, we will follow these steps:
- Anywhere in MainScene, drag and drop the Kaya@Happy Idle asset. If we click Play, we will see that the character is static: it has no life, and it doesn’t move with the animation we selected in Mixamo. This happens because we need to add an Animator component and link the animation.
Figure 11.8 – Placing the character in the scene
- With the Kaya@Happy Idle GameObject, click on the Add Component button in the Inspector panel and add the Animator component.
Figure 11.9 – Animator component
- The Animator component needs an Animator Controller. To create an Animator...