Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetNativePtr()

This method returns an IntPtr representing the native pointer to the XR device if one is available, otherwise the value will be IntPtr.Zero.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine.XR
  • Assembly: UnityEngine.VRModule
Warning
Deprecated. UnityEngine.VRModule is deprecated and will be removed in a future version. Please use the APIs in the UnityEngine.XRModule instead
public static nint GetNativePtr()

Returns

Type

Description

IntPtrThe native pointer to the XR device.

Remarks

This native pointer can be used along with other plugins or extensions to access additional details or functionality related to the XR device.