AnimationState.length 长度

var length : float

Description描述

The length of the animation clip in seconds.

动画剪辑的长度,单位是秒。

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);
Page last updated: 2011-1-7