docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateOrKeepBiggerComputeBuffer

    CreateOrKeepBiggerComputeBuffer<T>(ref ComputeBuffer, int, string)

    If the buffer does not have a size big enough to contain the count requested or is not currently allocated, release and allocate a new one.

    Declaration
    public static void CreateOrKeepBiggerComputeBuffer<T>(ref ComputeBuffer buffer, int count, string name = null) where T : unmanaged
    Parameters
    Type Name Description
    ComputeBuffer buffer

    Compute buffer to possibly reallocate

    int count

    Number of elements of type T in the buffer

    string name

    Optional name of the compute buffer used in debuggers

    Type Parameters
    Name Description
    T

    The type of the elements in the buffer

    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)