Method CopyFrom
CopyFrom<T>(ref NativeArray<T>, NativeList<T>)
Copies all elements of specified container to array.
Declaration
public static void CopyFrom<T>(this ref NativeArray<T> container, NativeList<T> other) where T : unmanaged, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
Native |
container | Container to copy to. |
Native |
other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if the array and container have unequal length. |
CopyFrom<T>(ref NativeArray<T>, in NativeHashSet<T>)
Copies all elements of specified container to array.
Declaration
public static void CopyFrom<T>(this ref NativeArray<T> container, in NativeHashSet<T> other) where T : unmanaged, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
Native |
container | Container to copy to. |
Native |
other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if the array and container have unequal length. |
CopyFrom<T>(ref NativeArray<T>, in UnsafeHashSet<T>)
Copies all elements of specified container to array.
Declaration
public static void CopyFrom<T>(this ref NativeArray<T> container, in UnsafeHashSet<T> other) where T : unmanaged, IEquatable<T>
Parameters
Type | Name | Description |
---|---|---|
Native |
container | Container to copy to. |
Unsafe |
other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if the array and container have unequal length. |