Animating GameObjects Using Timeline In Unity
Timeline is good for more than just moving cameras around. If you really wanted to you could use it to actually author animations, although they would only really work within the context of the timeline. This isn’t great for on-demand actions that happen during gameplay, but should be fine for any kind of pre-scripted sequence, if you don’t want to build your animations in an external tool like Blender. Even if you have a premade animation, you may still want to activate and deactivate game objects, or change their position over the course of a cutscene. Fortunately moving any sort of game object works in the same way, whether it is a renderable object or just a camera.
All you have to do is add an animation track within your timeline, hit record, then move your game object wherever you want it to be at each keyframed point along the timeline. Once your animation is recorded you can modify it’s timing and curves in the Animator panel.