docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRInputValueReader

    Base abstract class for a serializable input value reader without typed code.

    Inheritance
    object
    XRInputValueReader
    XRInputValueReader<TValue>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Readers
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public abstract class XRInputValueReader

    Constructors

    XRInputValueReader()

    Initializes and returns an instance of XRInputValueReader.

    Declaration
    protected XRInputValueReader()
    See Also
    XRInputValueReader<TValue>

    XRInputValueReader(InputAction, InputSourceMode)

    Initializes and returns an instance of XRInputValueReader.

    Declaration
    protected XRInputValueReader(InputAction inputAction, XRInputValueReader.InputSourceMode inputSourceMode)
    Parameters
    Type Name Description
    InputAction inputAction

    The directly serialized embedded input action.

    XRInputValueReader.InputSourceMode inputSourceMode

    The initial input source mode.

    See Also
    XRInputValueReader<TValue>

    Properties

    inputAction

    The directly serialized embedded input action that is read when the mode is set to InputAction.

    Declaration
    public InputAction inputAction { get; set; }
    Property Value
    Type Description
    InputAction
    See Also
    XRInputValueReader<TValue>

    inputActionReference

    The reference to an input action that is read when the mode is set to InputActionReference.

    Declaration
    public InputActionReference inputActionReference { get; set; }
    Property Value
    Type Description
    InputActionReference
    See Also
    XRInputValueReader<TValue>

    inputSourceMode

    The mode that determines from which input source the value is read from. By default this is set to InputActionReference to read from an input action defined in the project.

    Declaration
    public XRInputValueReader.InputSourceMode inputSourceMode { get; set; }
    Property Value
    Type Description
    XRInputValueReader.InputSourceMode
    See Also
    XRInputValueReader.InputSourceMode

    Methods

    DisableDirectActionIfModeUsed()

    Disable the directly serialized embedded input action if the mode is set to InputAction.

    Declaration
    public void DisableDirectActionIfModeUsed()
    See Also
    EnableDirectActionIfModeUsed()

    EnableDirectActionIfModeUsed()

    Enable the directly serialized embedded input action if the mode is set to InputAction.

    Declaration
    public void EnableDirectActionIfModeUsed()
    See Also
    DisableDirectActionIfModeUsed()

    See Also

    XRInputValueReader<TValue>
    In This Article
    Back to top
    Copyright © 2025 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)