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.