public float time ;

描述

该动画的当前时间。

如果时间大于长度,则将根据 wrapMode 对其进行包裹。 该值可大于动画长度。 在这种情况下,播放模式将在重新映射时间后进行采样。 该值通常为从 0 到无穷大。

using UnityEngine;
using System.Collections;

public class ExampleScript : MonoBehaviour { public Animation anim;

void Start() { // Rewind the walk animation anim["Walk"].time = 0.0f; } }