docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetTempArray

    GetTempArray<T>(int)

    Allocate a temporary typed array of a specific size. Unity releases the array at the end of the Render Pass.

    Declaration
    public T[] GetTempArray<T>(int size)
    Parameters
    Type Name Description
    int size

    Number of element in the array.

    Returns
    Type Description
    T[]

    A new array of type T with size number of elements.

    Type Parameters
    Name Description
    T

    Type of the array to be allocated.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)