Documentation

Unity Engine

Download Unity

Unity Engine

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

Copies a blob asset into new blob data that a BlobObjectReference keeps alive.
Read time 1 minuteLast updated 4 hours ago

Definition

public static BlobObjectReference<T> ToBlobObjectReference<T>(this BlobAssetReference<T> blobAssetReference, int version = 0) where T : unmanaged

Parameters

blobAssetReference

The blob asset to copy.

version

The version of the layout of
T
to store with the copy. The default value is 0.

Returns

Type

Description

BlobObjectReference<T>The new reference. You must dispose it. The reference is invalid if the
IsCreated
property of
blobAssetReference
is
false
.

Remarks

The method copies the blob, so you can dispose
blobAssetReference
after the call. No object owns the copy: the returned reference, and the references that you BlobObjectReference<T>.Clone from it, keep it alive. The copy is freed when you dispose the last of them.
You can call this method from any thread.