The exercise here demonstrates a short and sweet way to attach animation with a game object using Timeline in Unity.
- Select the game object that should animate and attach an animator component to it.
- Go to the timeline and add an animation track.
- Drag the game object on this track. (If you would directly drag the object without creating the component, Unity would prompt a message to do so.)
- Click on the option menu on this track and select “Add from animation clip”.
- Now, choose the clip that you would like to attach to this object.
- Note that, the object component would remain empty even though timeline attaches an animation clip.
You should get your animation going by now :)
Thank you very much