Handy Notes Unity About Animator Simple to use

1. The name of the currently playing animation

animator.GetCurrentAnimatorClipInfo(0)[0].clip.name//Animator当前正在播放的动画名字

2. Directly play the specified animation

animator.Play("Idle")//播放名叫IdLe的动画

3.Animator bool trigger

animator.SetBool("IsStop",true);

4.Animator trigger

 animator.SetTrigger("IsStop");

Guess you like

Origin blog.csdn.net/qq_36361484/article/details/122414015
Recommended