文档

Unity Engine

Unity Engine

time

The current time of the animation.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule
public float time { get; set; }

Remarks

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.

Examples

using UnityEngine;using System.Collections;public class ExampleScript : MonoBehaviour{ public Animation anim; void Start() { // Rewind the walk animation anim["Walk"].time = 0.0f; }}