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 |
---|---|---|
NativeArray<T> | container | Container to copy to. |
NativeList<T> | other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
ArgumentException | 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 |
---|---|---|
NativeArray<T> | container | Container to copy to. |
NativeHashSet<T> | other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
ArgumentException | 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 |
---|---|---|
NativeArray<T> | container | Container to copy to. |
UnsafeHashSet<T> | other | An container to copy into this array. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this container. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the array and container have unequal length. |