SetBlobAsset<T>(BlobAssetReference<T>, int)
Replaces the data stored in this object with a copy of a blob asset.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.AnimationModule
public void SetBlobAsset<T>(BlobAssetReference<T> blobAssetReference, int version = 0) where T : unmanaged
Parameters
The blob asset to copy. If its property is , the object becomes empty.
IsCreatedfalseThe 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.
blobAssetReferenceTCall this method from the main thread. References that you acquired earlier keep pointing to the previous data until you dispose them.