Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

NativeArrayUnsafeUtility.GetUnsafePtr

Declaration

public static void* GetUnsafePtr(NativeArray<T> nativeArray);

Parameters

nativeArray The NativeArray to check.

Returns

void* The memory buffer pointer of the NativeArray.

Description

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.