Complete the code to get the Animator component from the GameObject.
Animator animator = gameObject.GetComponent<[1]>();The Animator component controls animations in Unity. Use GetComponent<Animator>() to access it.
Complete the code to set the Animator parameter 'isRunning' to true.
animator.SetBool("isRunning", [1]);
The SetBool method expects a boolean value true or false, not a string or number.
Fix the error in the code to trigger the 'Jump' animation using a trigger parameter.
animator.[1]("Jump");
To activate a trigger parameter in Animator, use SetTrigger. Other methods set different parameter types.
Fill both blanks to create a dictionary that maps animation states to their speed multipliers.
var animationSpeeds = new Dictionary<string, float> { {"Idle", [1], {"Run", [2] };Idle animation usually plays at normal speed 1.0f, while Run is faster, e.g., 2.5f.
Fill all three blanks to create a filtered dictionary using LINQ that stores animation names and their lengths if length is greater than 1 second.
var longAnimations = animations.Where(anim => anim.length [3] 1.0f).ToDictionary(anim => [1], anim => [2]);
This code collects animation names and lengths only if the length is greater than 1 second.