Complete the code to get the Animator component from the GameObject.
Animator animator = gameObject.GetComponent<[1]>();The Animator component controls animations. Use GetComponent<Animator>() to access it.
Complete the code to play the animation state named "Run".
animator.[1]("Run");
Use Play to start an animation state by name immediately.
Fix the error in setting a trigger parameter named "Jump".
animator.[1]("Jump");
To activate a trigger parameter, use SetTrigger with the trigger's name.
Fill both blanks to check if the Animator is currently playing the "Idle" state in layer 0.
bool isIdle = animator.GetCurrentAnimatorStateInfo([1]).IsName([2]);
Layer 0 is the base layer. Use IsName("Idle") to check the state name.
Fill all three blanks to smoothly transition to the "Jump" animation using a trigger and a float parameter for speed.
animator.[1]("JumpTrigger"); animator.SetFloat("Speed", [2]); animator.[3]("Jump");
First set the trigger with SetTrigger, then set the speed float, then play the "Jump" animation.