Documentation

Unity Engine


Unity Engine


BlobAssetReference<T>

A reference to a blob asset stored in unmanaged memory.
Read time 1 minuteLast updated 2 days ago

Definition

public struct BlobAssetReference<T> : IDisposable, IEquatable<BlobAssetReference<T>> where T : unmanaged

Remarks

Create a blob asset using a BlobBuilder or by deserializing a serialized blob asset.

Properties

Property

Description

IsCreatedReports whether this instance references a valid blob asset.
ValueA reference to the blob asset data, a struct of type T that is stored in the blob asset.

Static Properties

Property

Description

NullA "null" blob asset reference that can be used to test if a BlobAssetReference instance

Methods

Method

Description

DisposeDestroys the referenced blob asset and frees its memory.
EqualsTwo BlobAssetReferences are equal when they reference the same data.
GetHashCodeGenerates the hash code for this object.
GetUnsafePtrProvides an unsafe pointer to the blob asset data.

Static Methods

Method

Description

CreateCreates a blob asset from an instance of a struct.
TryReadReads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset.
WriteWrites the blob data to a path with serialized version.

Operators

Operator

Description

operator ==Two BlobAssetReferences are equal when they reference the same data.
operator !=Two BlobAssetReferences are not equal unless they reference the same data.