docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Resize

    Resize(int, bool)

    Resize the Dynamic Array. This will reallocate memory if necessary and set the current size of the array to the provided size.

    Declaration
    public void Resize(int newSize, bool keepContent = false)
    Parameters
    Type Name Description
    int newSize

    New size 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)