Class BlobAssetReferenceIO<T>
Reads and writes BlobAssetReference<T> instances to binary readers, writers and files.
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
public static class BlobAssetReferenceIO<T> where T : unmanaged
Type Parameters
| Name | Description |
|---|---|
| T | The struct data type defining the data structure of the blob asset. |
Methods
| Name | Description |
|---|---|
| TryRead(string, int, out BlobAssetReference<T>) | Reads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset. |
| TryRead<U>(U, int, out BlobAssetReference<T>) | Reads bytes from a binary reader, validates the expected serialized version, and deserializes them into a new blob asset. |
| Write(BlobBuilder, string, int) | Writes the blob data to a path with serialized version. |
| Write<U>(U, BlobBuilder, int) | Reads bytes from a buffer, validates the expected serialized version, and deserializes them into a new blob asset. The returned blob reuses the data from the passed in pointer and is only valid as long as the buffer stays allocated. Also the returned blob asset reference can not be disposed. |