docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Reserve

    Reserve(int, bool)

    Sets the total number of elements the internal data structure can hold without resizing.

    Declaration
    public void Reserve(int newCapacity, bool keepContent = false)
    Parameters
    Type Name Description
    int newCapacity

    New capacity for the array.

    bool keepContent

    Set to true if you want the current content of the array to be kept.

    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)