- About XR
- XR Unity SDK
- XR SDK Release Notes
- Version:1.0.3
- Version:1.0.2
- Version:1.0.1
- Version:1.0.0
- Version:0.9.59
- Version:0.9.58
- Version:0.9.57
- Version:0.9.56
- Version:0.9.55
- Version:0.9.54
- Version:0.9.53
- Version:0.9.52
- Version:0.9.51
- Version:0.9.38
- Version:0.9.37
- Version:0.9.34
- Version:0.9.33
- Version:0.9.32
- Version:0.9.31
- Version:0.9.30
- Version:0.9.24
- Version:0.9.23 Beta
API - XRDeviceCallback¶
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.