Length
The duration of the clip in seconds, from its start time to its stop time.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Property
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public float Length { get; }
Remarks
This is the duration that a ClipSampler plays, and the size of the TimerState.Range of the timer that Clip.ToTimerState returns.
AnimationClip.length-
Clip.StartTime isn't 0.is then at least the stop time, while this value is the stop time minus the start time.
AnimationClip.length -
The curves of the clip go past Clip.StopTime.reports the end of the curves, but the clip stops at Clip.StopTime.
AnimationClip.length -
In a player build, Unity can strip the curves of a clip.is then the stop time.
AnimationClip.length
When you drive a ClipSampler, use Clip.StartTime, Clip.StopTime, and this property instead of .
AnimationClip.lengthAdditional Resources: Clip.StartTime, Clip.StopTime