public NativeArray(T[] array, Allocator allocMode) { if (array == null) { throw new ArgumentNullException("array"); } NativeArray <T> .Allocate(array.Length, allocMode, out this); this.FromArray(array); }
public NativeArray(NativeArray <T> array, Allocator allocMode) { NativeArray <T> .Allocate(array.Length, allocMode, out this); this.CopyFrom(array); }
public NativeArray(int length, Allocator allocMode) { NativeArray <T> .Allocate(length, allocMode, out this); }
public NativeArray(int length, Allocator allocMode) { NativeArray <T> .Allocate(length, allocMode, out this); UnsafeUtility.MemClear(this.m_Buffer, this.Length * UnsafeUtility.SizeOf <T>()); }