docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BlobAssetReferenceIO<T>

    Reads and writes BlobAssetReference<T> instances to binary readers, writers and files.

    Inheritance
    object
    BlobAssetReferenceIO<T>
    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.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)