docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryGetBuiltInDataArray

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

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

    Declaration
    public bool TryGetBuiltInDataArray<T>(string arrayName, out T[] dataArray) where T : IComparable, IConvertible, IComparable<T>, IEquatable<T>
    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 built-in data type from C# except char.

    TryGetBuiltInDataArray<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 TryGetBuiltInDataArray<T>(string arrayName, List<T> dataList) where T : IComparable, IConvertible, IComparable<T>, IEquatable<T>
    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 built-in data type from C# except char.

    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)