Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public T[] ToArray()
        {
            T[] array = new T[this.Length];
            NativeArray <T> .Copy(this, array, this.Length);

            return(array);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 public void CopyTo(NativeArray <T> array)
 {
     NativeArray <T> .Copy(this, array);
 }
Exemplo n.º 7
0
 public static void Copy(NativeArray <T> .ReadOnly src, T[] dst, int length)
 {
     NativeArray <T> .Copy(src, 0, dst, 0, length);
 }
Exemplo n.º 8
0
 public static void Copy(T[] src, NativeArray <T> dst, int length)
 {
     NativeArray <T> .Copy(src, 0, dst, 0, length);
 }
Exemplo n.º 9
0
 public void CopyFrom(NativeArray <T> array)
 {
     NativeArray <T> .Copy(array, this);
 }