docs.unity3d.com
    Show / Hide Table of Contents

    Method TryRead

    TryRead<U>(U, Int32, out BlobAssetReference<T>)

    Declaration
    public static bool TryRead<U>(U binaryReader, int version, out BlobAssetReference<T> result)
        where U : BinaryReader
    Parameters
    Type Name Description
    U binaryReader
    Int32 version
    BlobAssetReference<T> result
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    U

    TryRead(String, Int32, out BlobAssetReference<T>)

    Reads bytes from a fileName, validates the expected serialized version, and deserializes them into a new blob asset.

    Declaration
    public static bool TryRead(string path, int version, out BlobAssetReference<T> result)
    Parameters
    Type Name Description
    String path

    The path of the blob data to read.

    Int32 version

    Expected version number of the blob data.

    BlobAssetReference<T> result

    The resulting BlobAssetReference if the data was read successful.

    Returns
    Type Description
    Boolean

    A bool if the read was successful or not.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023