AnimationState.length 长度
var length : float
Description描述
The length of the animation clip in seconds.
动画剪辑的长度,单位是秒。
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(animation["Walk"].length);}}
// Print the length of the walk animation in seconds// 打印walk动画的长度print (animation["Walk"].length);