GetUnsafePtr<T>(NativeArray<T>)
Gets the pointer to the memory buffer owner of a NativeArray, and checks whether there is write access to the NativeArray. If there is no write access to the NativeArray, an InvalidOperationException is thrown.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.CoreModule
public static void* GetUnsafePtr<T>(this NativeArray<T> nativeArray) where T : struct
Parameters
The NativeArray to check.
Returns
Type | Description |
|---|---|
| void* | The memory buffer pointer of the NativeArray. |