ドキュメント

Unity Engine

Download Unity

Unity Engine

SetBlobAsset<T>(BlobAssetReference<T>, int)

Replaces the data stored in this object with a copy of a blob asset.
読み終わるまでの所要時間 1 分最終更新 2日前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule
public void SetBlobAsset<T>(BlobAssetReference<T> blobAssetReference, int version = 0) where T : unmanaged

Parameters

blobAssetReference

The blob asset to copy. If its
IsCreated
property is
false
, the object becomes empty.

version

The version of the layout of
T
. To read the data back, pass the same version to
AcquireReference
. The default value is 0.

Remarks

The object stores a copy of the blob, so you can dispose
blobAssetReference
after the call. The object also stores the type of
T
and the version, and BlobObject.AcquireReference returns a valid reference only for the same type and version.
Call this method from the main thread. References that you acquired earlier keep pointing to the previous data until you dispose them.