April 2018
Beginner
468 pages
11h 7m
English
You can set the values of the Animator Parameters via scripts using the SetFloat(), SetInteger(), SetBool(), and SetTrigger(), and ResetTrigger() functions of the Animator class. You reference the Animator Parameter variables by the string names assigned to them within the Animator.
To set the Animation Parameters, you first get the Animator on which the Parameters were defined; you can do this with either a public Animator variable or using GetComponent<Animator>(). Then, you call the necessary function on the Animator.
For example, the following script would set the Animator Parameters defined in the following screenshot:
using System.Collections;using System.Collections.Generic;using UnityEngine; ...