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

CommonUsages

class in UnityEngine.XR

/

Implemented in:UnityEngine.XRModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Defines static variables that are used to retrieve input features from XR.InputDevice.TryGetFeatureValue.

Use these static variables to retrieve common feature values by usage for an XR.InputDevice.

Static Properties

batteryLevelValue representing the current battery life of this device.
centerEyeAccelerationThe acceleration of the center eye on this device.
centerEyeAngularAccelerationThe angular acceleration of the center eye on this device, formatted as euler angles.
centerEyeAngularVelocityThe angular velocity of the center eye on this device, formatted as euler angles.
centerEyePositionThe position of the center eye on this device.
centerEyeRotationThe rotation of the center eye on this device.
centerEyeVelocityThe velocity of the center eye on this device.
colorCameraAccelerationThe acceleration of the color camera on this device.
colorCameraAngularAccelerationThe angular acceleration of the color camera on this device, formatted as euler angles.
colorCameraAngularVelocityThe angular velocity of the color camera on this device, formatted as euler angles.
colorCameraPositionThe position of the color camera on this device.
colorCameraRotationThe rotation of the color camera on this device.
colorCameraVelocityThe velocity of the color camera on this device.
deviceAccelerationThe acceleration of the device.
deviceAngularAccelerationThe angular acceleration of this device, formatted as euler angles.
deviceAngularVelocityThe angular velocity of this device, formatted as euler angles.
devicePositionThe position of the device.
deviceRotationThe rotation of this device.
deviceVelocityThe velocity of the device.
eyesDataAn Eyes struct containing eye tracking data collected from the device.
gripRepresents the users grip on the controller.
gripButtonA binary measure of whether the device is being gripped.
handDataValue representing the hand data for this device.
isTrackedInforms to the developer whether the device is currently being tracked.
leftEyeAccelerationThe acceleration of the left eye on this device.
leftEyeAngularAccelerationThe angular acceleration of the left eye on this device, formatted as euler angles.
leftEyeAngularVelocityThe angular velocity of the left eye on this device, formatted as euler angles.
leftEyePositionThe position of the left eye on this device.
leftEyeRotationThe rotation of the left eye on this device.
leftEyeVelocityThe velocity of the left eye on this device.
menuButtonRepresents a menu button, used to pause, go back, or otherwise exit gameplay.
primary2DAxisThe primary touchpad or joystick on a device.
primary2DAxisClickRepresents the primary 2D axis being clicked or otherwise depressed.
primary2DAxisTouchRepresents the primary 2D axis being touched.
primaryButtonThe primary face button being pressed on a device, or sole button if only one is available.
primaryTouchThe primary face button being touched on a device.
rightEyeAccelerationThe acceleration of the right eye on this device.
rightEyeAngularAccelerationThe angular acceleration of the right eye on this device, formatted as euler angles.
rightEyeAngularVelocityThe angular velocity of the right eye on this device, formatted as euler angles.
rightEyePositionThe position of the right eye on this device.
rightEyeRotationThe rotation of the right eye on this device.
rightEyeVelocityThe velocity of the right eye on this device.
secondary2DAxisA secondary touchpad or joystick on a device.
secondary2DAxisClickRepresents the secondary 2D axis being clicked or otherwise depressed.
secondary2DAxisTouchRepresents the secondary 2D axis being touched.
secondaryButtonThe secondary face button being pressed on a device.
secondaryTouchThe secondary face button being touched on a device.
trackingStateRepresents the values being tracked for this device.
triggerA trigger-like control, pressed with the index finger.
triggerButtonA binary measure of whether the index finger is activating the trigger.
userPresenceUse this property to test whether the user is currently wearing and/or interacting with the XR device. The exact behavior of this property varies with each type of device: some devices have a sensor specifically to detect user proximity, however you can reasonably infer that a user is present with the device when the property is UserPresenceState.Present.