docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryGetCustomDataArray

    TryGetCustomDataArray<T>(string, out T[])

    Try to find the array of data with the given name and deserialize it.

    Declaration
    public bool TryGetCustomDataArray<T>(string arrayName, out T[] dataArray) where T : IDictionaryConvertible, new()
    Parameters
    Type Name Description
    string arrayName

    The name of the array to retrieve.

    T[] dataArray

    The deserialized array of data if it was found.

    Returns
    Type Description
    bool

    Returns true if the array was found and deserialized; returns false otherwise.

    Type Parameters
    Name Description
    T

    Any IDictionaryConvertible object that have a default constructor.

    TryGetCustomDataArray<T>(string, List<T>)

    Try to find the array of data with the given name and deserialize it into the given list.

    Declaration
    public bool TryGetCustomDataArray<T>(string arrayName, List<T> dataList) where T : IDictionaryConvertible, new()
    Parameters
    Type Name Description
    string arrayName

    The name of the array to retrieve.

    List<T> dataList

    A list of data to fill with the found data. It must not be null and it will be cleared even if the array isn't found.

    Returns
    Type Description
    bool

    Returns true if the array was found and deserialized into the given list; returns false otherwise.

    Type Parameters
    Name Description
    T

    Any IDictionaryConvertible object that have a default constructor.

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