示例#1
0
        public static void Copy(NativeArray <T> .ReadOnly src, T[] dst)
        {
            AtomicSafetyHandle.CheckReadAndThrow(src.m_Safety);
            NativeArray <T> .CheckCopyLengths(src.Length, dst.Length);

            NativeArray <T> .Copy(src, 0, dst, 0, src.Length);
        }
示例#2
0
        public static void Copy(T[] src, NativeArray <T> dst)
        {
            AtomicSafetyHandle.CheckWriteAndThrow(dst.m_Safety);
            NativeArray <T> .CheckCopyLengths(src.Length, dst.Length);

            NativeArray <T> .Copy(src, 0, dst, 0, src.Length);
        }
示例#3
0
        public T[] ToArray()
        {
            T[] array = new T[this.Length];
            NativeArray <T> .Copy(this, array, this.Length);

            return(array);
        }
示例#4
0
        public NativeArray(NativeArray <T> array, Allocator allocator)
        {
            AtomicSafetyHandle.CheckReadAndThrow(array.m_Safety);
            NativeArray <T> .Allocate(array.Length, allocator, out this);

            NativeArray <T> .Copy(array, 0, this, 0, array.Length);
        }
示例#5
0
        public NativeArray(T[] array, Allocator allocator)
        {
            bool flag = array == null;

            if (flag)
            {
                throw new ArgumentNullException("array");
            }
            NativeArray <T> .Allocate(array.Length, allocator, out this);

            NativeArray <T> .Copy(array, this);
        }
示例#6
0
 public void CopyTo(NativeArray <T> array)
 {
     NativeArray <T> .Copy(this, array);
 }
示例#7
0
 public static void Copy(NativeArray <T> .ReadOnly src, T[] dst, int length)
 {
     NativeArray <T> .Copy(src, 0, dst, 0, length);
 }
示例#8
0
 public static void Copy(T[] src, NativeArray <T> dst, int length)
 {
     NativeArray <T> .Copy(src, 0, dst, 0, length);
 }
示例#9
0
 public void CopyFrom(NativeArray <T> array)
 {
     NativeArray <T> .Copy(array, this);
 }