ToClipReference(AnimationClip)
Acquires a reference to the sampling data of an animation clip.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
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 |
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.