docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    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
    object
    Object
    ScriptableObject
    XRInputDeviceValueReader
    XRInputDeviceValueReader<TValue>
    XRInputDeviceBoolValueReader
    XRInputDeviceFloatValueReader
    XRInputDeviceInputTrackingStateValueReader
    XRInputDeviceQuaternionValueReader
    XRInputDeviceVector2ValueReader
    XRInputDeviceVector3ValueReader
    Implements
    IXRInputValueReader<TValue>
    IXRInputValueReader
    Inherited Members
    XRInputDeviceValueReader.characteristics
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    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

    Type of the value to read, such as Vector2 or float.

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)