Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


time

The current time of the animation.
Read time 1 minuteLast updated 4 days ago

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; }}