Documentation

Unity Engine

Download Unity

Unity Engine

ToClipReference(AnimationClip)

Acquires a reference to the sampling data of an animation clip.
Read time 1 minuteLast updated 4 hours ago

Definition

public static BlobObjectReference<Clip> ToClipReference(this AnimationClip clip)

Parameters

The animation clip to get the data from. Can be null.

Returns

Type

Description

BlobObjectReference<Clip>The reference to the Clip data of the animation clip. Dispose the reference when you finish with it. BlobObjectReference<T>.IsValid is
false
if
clip
is
null
, is a legacy clip, has no data, or stores data with another layout version.

Remarks

Use this method to get the clip data in a form that jobs and Burst-compiled code can read. The reference keeps the data alive until you dispose it, even if the animation clip is destroyed or its data is replaced. Call this method from the main thread.