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); }
public static NativeBufferArray <T> From(ListCopyable <T> arr) { return(new NativeBufferArray <T>(arr)); }
internal NativeBufferArray(ListCopyable <T> arr) { this.Length = arr.Count; this.arr = new NativeArray <T>(arr.innerArray.arr, Allocator.Persistent); }