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
Create a blob asset using a
BlobBuilder or by deserializing a serialized blob asset.
Properties
Property | Description |
|---|
| IsCreated | Reports whether this instance references a valid blob asset. |
| Value | A reference to the blob asset data, a struct of type T that is stored in the blob asset. |
Static Properties
Property | Description |
|---|
| Null | A "null" blob asset reference that can be used to test if a BlobAssetReference instance |
Methods
Method | Description |
|---|
| Dispose | Destroys the referenced blob asset and frees its memory. |
| Equals | Two BlobAssetReferences are equal when they reference the same data. |
| GetHashCode | Generates the hash code for this object. |
| GetUnsafePtr | Provides an unsafe pointer to the blob asset data. |
Static Methods
Method | Description |
|---|
| Create | Creates a blob asset from an instance of a struct. |
| TryRead | Reads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset. |
| Write | Writes 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. |