Clip
The baked data of an animation clip, such as its start time, length, and whether it loops.
Read time 1 minuteLast updated 3 hours ago
Definition
- Type: Struct
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public struct Clip
Remarks
Call AnimationClipExtensions.ToClipReference to get a reference to the clip data of an animation clip. Read the properties of the clip through BlobObjectReference<T>.Value, from the main thread, jobs and Burst-compiled code. Use Clip.ToTimerState to create a timer that plays the clip. To sample the clip into an AnimationStream, create a ClipSampler instead.
Properties
Property | Description |
|---|---|
| Length | The duration of the clip in seconds, from its start time to its stop time. |
| LoopTime | Whether the clip loops, as set by Loop Time in the clip settings. |
| StartTime | The time on the clip curves where the clip starts, in seconds. |
| StopTime | The time on the clip curves where the clip ends, in seconds. |
Methods
Method | Description |
|---|---|
| ToTimerState | Creates a timer for the clip, positioned at a time from the start of the clip. |