随手笔记 Unity 关于Animator 简单使用

1.当前正在播放的动画名称

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

2.直接播放指定动画

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

3.Animator bool 触发

animator.SetBool("IsStop",true);

4.Animator 触发

 animator.SetTrigger("IsStop");

猜你喜欢

转载自blog.csdn.net/qq_36361484/article/details/122414015