Select your preferred scripting language. All code snippets will be displayed in this language.
struct in Unity.Collections
/
Implemented in:UnityEngine.CoreModule
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseA NativeArray exposes a buffer of native memory to managed code, making it possible to share data between managed and native.
IsCreated | Indicates that the NativeArray has an allocated memory buffer. |
Length | Number of elements in the NativeArray. |
this[int] | Access NativeArray elements by index. Notice that structs are returned by value and not by reference. |
NativeArray_1 | Create NativeArray. |
CopyFrom | Copy all the elements from another NativeArray or managed array of the same length. |
CopyTo | Copy all elements to another NativeArray or managed array of the same length. |
Dispose | Dispose array. |
GetEnumerator | Get enumerator. |
ToArray | Convert NativeArray to array. |