AcquireReference<T>(UnityObjectRef<BlobObject>, int)
Acquires a reference to the blob data stored in the object that a UnityObjectRef points to.
Read time 1 minuteLast updated 3 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public static BlobObjectReference<T> AcquireReference<T>(this UnityObjectRef<BlobObject> objectRef, int version = 0) where T : unmanaged
Parameters
The reference to the object. If it is invalid, the returned reference is invalid.
The version of the layout of that the stored data must have.
TReturns
Type | Description |
|---|---|
| BlobObjectReference<T> | The new reference. You must dispose it. The reference is invalid if the object is null, empty, or stores another version of the blob. |
Remarks
Use this method when you hold the object as a , for example in an Entities component. It does the same as BlobObject.AcquireReference, and returns an invalid reference if the object reference doesn't point to an object. Call this method from the main thread.
UnityObjectRef