Copy
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
Read time 6 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.CoreModule
Copy(NativeArray<T>, NativeArray<T>)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, NativeArray<T> dst)
Parameters
Copy(ReadOnly, NativeArray<T>)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, NativeArray<T> dst)
Parameters
Copy(`0[], NativeArray<T>)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(T[] src, NativeArray<T> dst)
Parameters
Copy(NativeArray<T>, `0[])
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, T[] dst)
Parameters
Copy(ReadOnly, `0[])
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, T[] dst)
Parameters
Copy(NativeArray<T>, NativeArray<T>, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, NativeArray<T> dst, int length)
Parameters
The data to copy.
The array that receives the data.
A 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(ReadOnly, NativeArray<T>, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, NativeArray<T> dst, int length)
Parameters
The data to copy.
The array that receives the data.
A 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(`0[], NativeArray<T>, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(T[] src, NativeArray<T> dst, int length)
Parameters
The data to copy.
The array that receives the data.
A 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(NativeArray<T>, `0[], int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, T[] dst, int length)
Parameters
The data to copy.
The array that receives the data.
A 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(ReadOnly, `0[], int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, T[] dst, int length)
Parameters
Copy(NativeArray<T>, int, NativeArray<T>, int, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
The data to copy.
A 32-bit integer that represents the index in the array where copying begins.
srcThe array that receives the data.
A 32-bit integer that represents the index in the array where storing begins.
dstA 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(ReadOnly, int, NativeArray<T>, int, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
The data to copy.
A 32-bit integer that represents the index in the array where copying begins.
srcThe array that receives the data.
A 32-bit integer that represents the index in the array where storing begins.
dstA 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(`0[], int, NativeArray<T>, int, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(T[] src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
The data to copy.
A 32-bit integer that represents the index in the array where copying begins.
srcThe array that receives the data.
A 32-bit integer that represents the index in the array where storing begins.
dstA 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(NativeArray<T>, int, `0[], int, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T> src, int srcIndex, T[] dst, int dstIndex, int length)
Parameters
The data to copy.
A 32-bit integer that represents the index in the array where copying begins.
srcThe array that receives the data.
A 32-bit integer that represents the index in the array where storing begins.
dstA 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.
Copy(ReadOnly, int, `0[], int, int)
Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index.
public static void Copy(NativeArray<T>.ReadOnly src, int srcIndex, T[] dst, int dstIndex, int length)
Parameters
The data to copy.
A 32-bit integer that represents the index in the array where copying begins.
srcThe array that receives the data.
A 32-bit integer that represents the index in the array where storing begins.
dstA 32-bit integer that represents the number of elements to copy. The integer must be equal to or greater than zero.