docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetBufferData

    SetBufferData<T>(CommandBuffer, StructuredBuffer<T>, List<T>)

    Adds a command to set the GPU buffer with values from a list.

    Declaration
    public static void SetBufferData<T>(this CommandBuffer cmd, StructuredBuffer<T> buffer, List<T> data) where T : unmanaged
    Parameters
    Type Name Description
    CommandBuffer cmd

    The command buffer.

    StructuredBuffer<T> buffer

    The destination buffer.

    List<T> data

    The list of values to fill the buffer with.

    Type Parameters
    Name Description
    T

    The type of elements in the GPU buffer.

    Remarks

    This will call Resize(int, ResizeOptions) with the number of elements in data. Previous contents of the underlying buffer are ignored.

    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)