Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetData

Set the buffer with values from an array.
Read time 2 minutesLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

SetData(Array)

Set the buffer with values from an array.
public void SetData(Array data)

Parameters

data

Array of values to fill the buffer.

SetData<T>(List<T>)

Set the buffer with values from an array.
public void SetData<T>(List<T> data) where T : struct

Parameters

Array of values to fill the buffer.

SetData<T>(NativeArray<T>)

Set the buffer with values from an array.
public void SetData<T>(NativeArray<T> data) where T : struct

Parameters

Array of values to fill the buffer.

SetData(Array, int, int, int)

Partial copy of data values from an array into the buffer.
public void SetData(Array data, int managedBufferStartIndex, int graphicsBufferStartIndex, int count)

Parameters

data

Array of values to fill the buffer.

managedBufferStartIndex

The first element index in data to copy to the graphics buffer.

graphicsBufferStartIndex

The first element index in the graphics buffer to receive the data.

count

The number of elements to copy.

SetData<T>(List<T>, int, int, int)

Partial copy of data values from an array into the buffer.
public void SetData<T>(List<T> data, int managedBufferStartIndex, int graphicsBufferStartIndex, int count) where T : struct

Parameters

Array of values to fill the buffer.

managedBufferStartIndex

The first element index in data to copy to the graphics buffer.

graphicsBufferStartIndex

The first element index in the graphics buffer to receive the data.

count

The number of elements to copy.

SetData<T>(NativeArray<T>, int, int, int)

Partial copy of data values from an array into the buffer.
public void SetData<T>(NativeArray<T> data, int nativeBufferStartIndex, int graphicsBufferStartIndex, int count) where T : struct

Parameters

Array of values to fill the buffer.

nativeBufferStartIndex


graphicsBufferStartIndex

The first element index in the graphics buffer to receive the data.

count

The number of elements to copy.