docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CopyFrom

    CopyFrom(IEnumerable<T>, CommandBuffer)

    Copies the data to the CPU list, then sends the given data to the GPU buffer, allocating or resizing it if necessary.

    Declaration
    public void CopyFrom(IEnumerable<T> data, CommandBuffer cmd = null)
    Parameters
    Type Name Description
    IEnumerable<T> data

    The data to set.

    CommandBuffer cmd

    An optional command buffer to add the command to.

    Remarks

    Previous contents of the underlying buffer and list are ignored. Use a command buffer to ensure proper synchronization. If not, call the function during Update or before. If the given data is a List that will not be used after the call, consider using UseList(List<T>, CommandBuffer) instead.

    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)