Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


length

The length of the animation clip in seconds.
Read time 1 minuteLast updated 4 days ago

Definition

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

Examples

using UnityEngine;using System.Collections;public class ExampleScript : MonoBehaviour{ public Animation anim; void Start() { // Print the length of the walk animation in seconds print(anim["Walk"].length); }}