Animator Length 구하기 API
Unity/찾아본것 2019. 4. 23. 17:551 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | private float GetAnimLength(string animName) { float time = 0; RuntimeAnimatorController ac = heroAnim.runtimeAnimatorController; for (int i = 0; i < ac.animationClips.Length; i++) { if (ac.animationClips[i].name == animName) { time = ac.animationClips[i].length; } } return time; } | cs |
1 | var length = this.GetAnimLength("attack_sword_01"); | cs |
'Unity > 찾아본것' 카테고리의 다른 글
<화면 나누기> ViewportRect사용 (0) | 2019.06.14 |
---|---|
setdestination can only be called on an active agent that has been placed on a navmesh (0) | 2019.05.03 |
유니티 현재의 씬 다시 불러오기 (0) | 2019.05.02 |
Unity Canvas (0) | 2019.04.24 |
GameObject, TimedeltaTime (0) | 2019.04.14 |