Exemplo n.º 1
0
        public static BufferArray <T> From(ListCopyable <T> arr)
        {
            var length = arr.Count;
            var buffer = PoolArray <T> .Spawn(length);

            System.Array.Copy(arr.innerArray.arr, buffer.arr, length);

            return(buffer);
        }
Exemplo n.º 2
0
 public static NativeBufferArray <T> From(ListCopyable <T> arr)
 {
     return(new NativeBufferArray <T>(arr));
 }
Exemplo n.º 3
0
 internal NativeBufferArray(ListCopyable <T> arr)
 {
     this.Length = arr.Count;
     this.arr    = new NativeArray <T>(arr.innerArray.arr, Allocator.Persistent);
 }