4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unity - 現在再生されているアニメーションのクリップ名を取得する

Last updated at Posted at 2019-09-06

以下のように記述すると取得できる。

Animator animator = GetComponent<Animator>();
var clipInfo = animator.GetCurrentAnimatorClipInfo(0)[0];   // 引数はLayer番号、配列の0番目
Debug.Log("AnimationClip名 : " + clipInfo.clip.name);
4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?