Documentation

Unity Engine

Download Unity

Unity Engine

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

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

LengthThe duration of the clip in seconds, from its start time to its stop time.
LoopTimeWhether the clip loops, as set by Loop Time in the clip settings.
StartTimeThe time on the clip curves where the clip starts, in seconds.
StopTimeThe time on the clip curves where the clip ends, in seconds.

Methods

Method

Description

ToTimerStateCreates a timer for the clip, positioned at a time from the start of the clip.