XRSPACE Developer Console

API - XRDeviceCallback

Contents

Field

  • public XRDeviceType Device

Description Determine which device monitored by script.


  • public bool IsController

Description When device is Handler, determine monitor controller or hand event.


  • public XRControllerButton TriggerButton

Description When device is Handler, determine which button monitored by script.

Event

  • public event UnityAction OnButton

Description When the device is Handler and IsController is true, trigger during controller click.


  • public event UnityAction OnButtonDown

Description When the device is Handler and IsController is true, triggered if the controller starts clicking.


  • public event UnityAction OnButtonUp

Description When the device is Handler and IsController is true, triggered if the controller stops clicking.


  • public event UnityAction OnGaze

Description When the device is Headset, trigger during the gaze process, and the return value is the progress of the gaze. When the return value is equal to ‘1’, it will trigger the click event of the object being watched.


  • public event UnityAction OnGazeEnter

Description When the device is Headset, triggered if starts looking at an object.


  • public event UnityAction OnGazeExit

Description When the device is Headset, and OnGazeEnter is triggered, it will trigger when leaving the gaze.


  • public event UnityAction OnGesture

Description When the device is Handler and IsController is false, return gesture’s type.