{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method TryRead | Entities | 1.2.0-exp.3
docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TryRead

    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.

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

    The reader for the blob data path

    int version

    Expected version number of the blob data.

    BlobAssetReference<T> result

    The resulting BlobAssetReference if the data was read successful.

    Returns
    Type Description
    bool

    True if the data was successfully read, false otherwise

    Type Parameters
    Name Description
    U

    The type of binary reader

    TryRead(string, int, 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.

    int version

    Expected version number of the blob data.

    BlobAssetReference<T> result

    The resulting BlobAssetReference if the data was read successful.

    Returns
    Type Description
    bool

    A bool if the read was successful or not.

    In This Article
    Back to top
    Copyright © 2023 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)