Scripting API

NativeArrayExtensions

static class in Unity.Collections · Unity.Collections

5 of 5 of Unity's members

Methods 7

static bool ArraysEqual<T>(this NativeArray<T> container, in NativeArray<T> other)
static bool Contains<T, U>(this NativeArray<T> array, U value)
static bool Contains<T, U>(this NativeArray<T>.ReadOnly array, U value)
static bool Contains<T, U>(void* ptr, int length, U value)
static void CopyFrom<T>(this ref NativeArray<T> container, NativeList<T> other)
static int IndexOf<T, U>(this NativeArray<T> array, U value)
static int IndexOf<T, U>(this NativeArray<T>.ReadOnly array, U value)
static int IndexOf<T, U>(void* ptr, int length, U value)
static void Initialize<T>(this ref NativeArray<T> array, int length, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
static NativeArray<U> Reinterpret<T, U>(this NativeArray<T> array)
static int Unique<T>(this NativeArray<T> array)

Removes consecutive duplicates in place; the number of elements kept.