Animating in Unity
Animating objects in Unity can range from a simple rotation effect to complex character movements and actions. You can create animations in code or with the Animation and Animator windows:
- The Animation window is where animation segments, called clips, are created and managed using a timeline. Object properties are recorded along this timeline and are then played back to create an animated effect.
- The Animator window manages these clips and their transitions using objects called animation controllers.
You can find more information about the Animator window and its controllers at https://docs.unity3d.com/Manual/AnimatorControllers.html.
Creating and manipulating your target objects in clips will have your game moving in no time. For our short trip into Unity animations, we'll create the same rotation effect in code and using the Animator.
Creating animations in code
To start, we're going to create...