SetBlobAsset<T>(BlobObjectReference<T>, int)
Replaces the data stored in this object with a copy of the blob data of a reference.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AnimationModule
public void SetBlobAsset<T>(BlobObjectReference<T> reference, int version = 0) where T : unmanaged
Parameters
The reference to the blob data to copy. If it is invalid, the object becomes empty.
The version of the layout of . To read the data back, pass the same version to . The default value is 0.
TAcquireReferenceRemarks
The object stores a copy of the blob, so you can dispose after the call. The object also stores the type of and the version, and BlobObject.AcquireReference returns a valid reference only for the same type and version.
referenceTTo store a blob asset that you built with a , copy it into a reference first with .
BlobBuilderBlobAssetReferenceExtensions.ToBlobObjectReferenceCall this method from the main thread. References that you acquired earlier keep pointing to the previous data until you dispose them.