Answers for "how to play an animation once unity"

C#
12

how to play animation with code in unity

public GameObject ExampleNPC;

void Update()
{
    if(Input.GetButtonDown("Animation")) // Make sure to refrence this in Input settings
    {
        ExampleNPC.GetComponent<Animator>().Play("Anim name");
    }
}
Posted by: Guest on August-04-2020
9

play animation through script unity

animator.Play("StateName");
Posted by: Guest on June-30-2020
0

unity play animation on click

animator.Play("anim");
Posted by: Guest on June-11-2021

Code answers related to "how to play an animation once unity"

C# Answers by Framework

Browse Popular Code Answers by Language