NativeSlice
Constructs a new NativeSlice from another NativeSlice, with a defined start index.
Read time 2 minutesLast updated 10 days ago
Definition
- Type: Constructor
- Namespace: Unity.Collections
- Assembly: UnityEngine.CoreModule
NativeSlice(NativeSlice<T>, int)
Constructs a new NativeSlice from another NativeSlice, with a defined start index.
public NativeSlice(NativeSlice<T> slice, int start)
Parameters
The NativeSlice<T> to use.
The index of the first element from the source slice to include in the new slice.
Remarks
Constructs a new that provides a view over the memory of another existing , beginning at a specified starting index.
NativeSliceNativeSliceNativeSlice(NativeSlice<T>, int, int)
Constructs a new NativeSlice of defined length , from another NativeSlice, with a defined start index.
lengthpublic NativeSlice(NativeSlice<T> slice, int start, int length)
Parameters
The NativeSlice<T> to use.
The index of the first element from the source slice to include in the new slice.
The number of elements that the new NativeSlice will have.
Remarks
Constructs a new that provides a view over a defined sub-region of another existing , beginning at a specified starting index and covering an exact number of elements.
NativeSliceNativeSliceNativeSlice(NativeArray<T>)
Constructs a new NativeSlice from a NativeArray.
public NativeSlice(NativeArray<T> array)
Parameters
The NativeArray<T> to use.
Remarks
Constructs a new NativeSlice from a NativeArray or NativeSlice.
Constructs a new that provides a view over the memory of the specified .
NativeSliceNativeArrayNativeSlice(NativeArray<T>, int)
Constructs a new NativeSlice from a NativeArray, with a defined start index.
public NativeSlice(NativeArray<T> array, int start)
Parameters
Remarks
Constructs a new that provides a view over the memory of the specified , beginning at a specified starting index.
NativeSliceNativeArrayNativeSlice(NativeArray<T>, int, int)
Constructs a new NativeSlice of defined length , from a NativeArray with a defined start index.
lengthpublic NativeSlice(NativeArray<T> array, int start, int length)
Parameters
The NativeArray<T> to use.
The index of the first element from the source to include in the slice.
The number of elements that the new NativeSlice will have.
Remarks
Constructs a new that provides a view over a sub-region of the specified , beginning at a specified starting index and covering a specific number of elements.
NativeSliceNativeArray