Class XRInputDeviceValueReader<TValue>
A ScriptableObject that provides a typed value from a device from the XR input subsystem as defined by its characteristics and feature usage string. Intended to be used with an XRInputValueReader as its object reference or as part of an XRInputDeviceButtonReader.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Readers
Assembly: solution.dll
Syntax
public abstract class XRInputDeviceValueReader<TValue> : XRInputDeviceValueReader, IXRInputValueReader<TValue>, IXRInputValueReader where TValue : struct
Type Parameters
| Name | Description |
|---|---|
| TValue |
Properties
| Name | Description |
|---|---|
| usage | The name of the input feature usage to read. |
Methods
| Name | Description |
|---|---|
| ReadBoolValue() | Read the value of the input as a bool. |
| ReadFloatValue() | Read the value of the input as a float. |
| ReadInputTrackingStateValue() | Read the value of the input as an InputTrackingState. |
| ReadQuaternionValue() | Read the value of the input as a Quaternion. |
| ReadUIntValue() | Read the value of the input as an uint. |
| ReadValue() | Read the current value from the input source. |
| ReadVector2Value() | Read the value of the input as a Vector2. |
| ReadVector3Value() | Read the value of the input as a Vector3. |
| RefreshInputDeviceIfNeeded() | Updates the found input device used to read input from if it isn't valid. This should be called before attempting to read a value from the input device. |
| TryReadBoolValue(out bool) | Try to read the value of the input as a bool. |
| TryReadFloatValue(out float) | Try to read the value of the input as a float. |
| TryReadInputTrackingStateValue(out InputTrackingState) | Try to read the value of the input as an InputTrackingState. |
| TryReadQuaternionValue(out Quaternion) | Try to read the value of the input as a Quaternion. |
| TryReadUIntValue(out uint) | Try to read the value of the input as an uint. |
| TryReadValue(out TValue) | Try to read the current value from the input source. |
| TryReadVector2Value(out Vector2) | Try to read the value of the input as a Vector2. |
| TryReadVector3Value(out Vector3) | Try to read the value of the input as a Vector3. |