docs.unity3d.com
    Show / Hide Table of Contents

    Class ArrayUtilities

    Utility class for converting Array types from one type to another without copying.

    Inheritance
    Object
    ArrayUtilities
    Namespace: Unity.Simulation
    Syntax
    public static class ArrayUtilities

    Methods

    Allocate<T>(Int32)

    Declaration
    public static T[] Allocate<T>(int length)
    Parameters
    Type Name Description
    Int32 length
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    Cast<T>(Array)

    Casts an input array to type T if supported by the cast map.

    Declaration
    public static T[] Cast<T>(Array array)
    Parameters
    Type Name Description
    Array array

    Input array to be casted.

    Returns
    Type Description
    T[]

    Array of type T.

    Type Parameters
    Name Description
    T

    Cast type.

    Count<T>(T[])

    Returns actual count of a casted array.

    Declaration
    public static int Count<T>(T[] array)
    Parameters
    Type Name Description
    T[] array

    Input casted array

    Returns
    Type Description
    Int32

    Actual count of a casted array

    Type Parameters
    Name Description
    T

    Cast type.

    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