public NativeArrayBurst(T[] array, Allocator allocator) { if (array == null) { throw new ArgumentNullException(nameof(array)); } NativeArrayBurst <T> .Allocate(array.Length, allocator, out this); NativeArrayBurst <T> .Copy(array, this); }
public static void Copy(T[] src, NativeArrayBurst <T> dst) { #if COLLECTIONS_CHECKS AtomicSafetyHandle.CheckWriteAndThrow(dst.m_Safety); if (src.Length != dst.Length) { throw new ArgumentException("source and destination length must be the same"); } #endif NativeArrayBurst <T> .Copy(src, 0, dst, 0, src.Length); }
public static void Copy(T[] src, NativeArrayBurst <T> dst, int length) => NativeArrayBurst <T> .Copy(src, 0, dst, 0, length);