---
title: Length
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/clip/length
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/clip/length.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:06:16.389Z
locale: en-us
---

# Length

> The duration of the clip in seconds, from its start time to its stop time.

## Definition

* **Type:** Property
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

```csharp
public float Length { get; }
```

### Remarks

This is the duration that a [ClipSampler](/engine/7000.0/script-reference/unity/animations/clipsampler.md) plays, and the size of the [TimerState.Range](/engine/7000.0/script-reference/unity/animations/timerstate/range.md) of the timer that [Clip.ToTimerState](/engine/7000.0/script-reference/unity/animations/clip/totimerstate.md) returns.

`AnimationClip.length` is the time at the end of the curves of the clip, not a duration, so it can differ from this value. The two values are the same only when [Clip.StartTime](/engine/7000.0/script-reference/unity/animations/clip/starttime.md) is 0 and the stop time is the end of the last curve. They differ in the following cases:

* [Clip.StartTime](/engine/7000.0/script-reference/unity/animations/clip/starttime.md) isn't 0. `AnimationClip.length` is then at least the stop time, while this value is the stop time minus the start time.

* The curves of the clip go past [Clip.StopTime](/engine/7000.0/script-reference/unity/animations/clip/stoptime.md). `AnimationClip.length` reports the end of the curves, but the clip stops at [Clip.StopTime](/engine/7000.0/script-reference/unity/animations/clip/stoptime.md).

* In a player build, Unity can strip the curves of a clip. `AnimationClip.length` is then the stop time.

When you drive a [ClipSampler](/engine/7000.0/script-reference/unity/animations/clipsampler.md), use [Clip.StartTime](/engine/7000.0/script-reference/unity/animations/clip/starttime.md), [Clip.StopTime](/engine/7000.0/script-reference/unity/animations/clip/stoptime.md), and this property instead of `AnimationClip.length`.

Additional Resources: [Clip.StartTime](/engine/7000.0/script-reference/unity/animations/clip/starttime.md), [Clip.StopTime](/engine/7000.0/script-reference/unity/animations/clip/stoptime.md)
