public GameObject ExampleNPC; void Update() { if(Input.GetButtonDown("Animation")) // Make sure to refrence this in Input settings { ExampleNPC.GetComponent<Animator>().Play("Anim name"); } }
animator.Play("StateName");