AnimationState.time 时间

var time : float


The current time of the animation


If the time is larger than length it will be wrapped according to wrapMode. The value can be larger than the animations length. In this case playback mode will remap the time before sampling. This value usually goes from 0 to infinity


using UnityEngine;

using System.Collections;

public class example : MonoBehaviour {

	public void Awake() {

		animation["Walk"].time = 0.0F;


// Rewind the walk animation

// 将walk动画置为初始

animation["Walk"].time = 0.0;
Page last updated: 2011-1-7