Animate Collectable in Unity.
Objective: create a spin animation for the collectable prefab.
First step is to add an animator component to the collectable in the scene.
We have to create a new animator controller and a new animation, the animator controller has to be assigned in the inspector and the animation has to be added to the animator controller.
Then we have to select the object and go to the animation window, press the record button and and change the rotation of the object in the timeline. To finish the animation you have to select the record button again.
And that’s it we have a simple rotation animation for our collectables.