A NativeArray exposes a buffer of native memory to managed code, making it possible to share data between managed and native without marshalling costs.
Behind the scenes, NativeArrays provide systems that allows them to be used safely with jobs, and automatic tracking of memory leaks.
IsCreated | 指示 NativeArray 有一个已分配的内存缓冲区。 |
Length | NativeArray 中元素的数量。 |
this[int] | 按索引访问 NativeArray 元素。请注意,结构是按值而非引用返回的。 |
NativeArray_1 | Creates a new NativeArray from an existing array of elements. |
CopyFrom | 从长度相同的另一个 NativeArray 或托管数组中复制所有元素。 |
CopyTo | 将所有元素复制到长度相同的另一个 NativeArray 或托管数组。 |
Dispose | Disposes the NativeArray. |
Equals | Compares to NativeArray. |
GetEnumerator | 获取枚举器。 |
GetHashCode | Returns a hash code for the current instance. |
ToArray | 将 NativeArray 转换为数组。 |
Copy | Copies a range of elements from a source array to a destination array, starting from the source index and copying them to the destination index. |