docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AndroidMouseInteractionProfile.AndroidMouseInteraction

    An InputDevice representing an Android mouse that supports interaction in OpenXR.

    Inheritance
    object
    InputControl
    InputDevice
    AndroidMouseInteractionProfile.AndroidMouseInteraction
    Inherited Members
    InputDevice.InvalidDeviceId
    InputDevice.description
    InputDevice.enabled
    InputDevice.canRunInBackground
    InputDevice.added
    InputDevice.remote
    InputDevice.native
    InputDevice.updateBeforeRender
    InputDevice.deviceId
    InputDevice.lastUpdateTime
    InputDevice.wasUpdatedThisFrame
    InputDevice.allControls
    InputDevice.valueType
    InputDevice.valueSizeInBytes
    InputDevice.all
    InputDevice.ReadValueFromBufferAsObject(void*, int)
    InputDevice.ReadValueFromStateAsObject(void*)
    InputDevice.ReadValueFromStateIntoBuffer(void*, void*, int)
    InputDevice.CompareValue(void*, void*)
    InputDevice.MakeCurrent()
    InputDevice.OnAdded()
    InputDevice.OnRemoved()
    InputDevice.OnConfigurationChanged()
    InputDevice.ExecuteCommand<TCommand>(ref TCommand)
    InputDevice.ExecuteCommand(InputDeviceCommand*)
    InputControl.name
    InputControl.displayName
    InputControl.shortDisplayName
    InputControl.path
    InputControl.layout
    InputControl.variants
    InputControl.device
    InputControl.parent
    InputControl.children
    InputControl.usages
    InputControl.aliases
    InputControl.stateBlock
    InputControl.noisy
    InputControl.synthetic
    InputControl.this[string]
    InputControl.magnitude
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(void*)
    InputControl.WriteValueFromBufferIntoState(void*, int, void*)
    InputControl.WriteValueFromObjectIntoState(object, void*)
    InputControl.TryGetChildControl(string)
    InputControl.TryGetChildControl<TControl>(string)
    InputControl.GetChildControl(string)
    InputControl.GetChildControl<TControl>(string)
    InputControl.RefreshConfigurationIfNeeded()
    InputControl.RefreshConfiguration()
    InputControl.m_StateBlock
    InputControl.currentStatePtr
    InputControl.previousFrameStatePtr
    InputControl.defaultStatePtr
    InputControl.noiseMaskPtr
    InputControl.stateOffsetRelativeToDeviceRoot
    InputControl.optimizedControlDataType
    InputControl.CalculateOptimizedControlDataType()
    InputControl.ApplyParameterChanges()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.Features.Interactions
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    [Preserve]
    public class AndroidMouseInteractionProfile.AndroidMouseInteraction : InputDevice

    Properties

    aim

    A 3D pointer ray pose for interaction. Position is typically at the user's head location, and orientation where -Z direction is the forward aiming direction. Relative mouse movement computes movement along a sphere around the user's head. Position supports depth movement via scroll input (positive scroll moves forward, negative moves backward).

    Declaration
    public PoseControl aim { get; }
    Property Value
    Type Description
    PoseControl

    click

    Primary mouse button (select/click). Returns true when the primary button is pressed.

    Declaration
    public ButtonControl click { get; }
    Property Value
    Type Description
    ButtonControl

    scroll

    Mouse scroll wheel input. 2D continuous input with X and Y components in range -1.0 to 1.0. The Y component represents vertical scrolling (where -1.0 is scroll down and 1.0 is scroll up). The X component represents horizontal scrolling. Used for depth movement and interaction scrolling.

    Declaration
    public Vector2Control scroll { get; }
    Property Value
    Type Description
    Vector2Control

    secondaryClick

    Secondary mouse button (right-click). Returns true when the secondary button is pressed.

    Declaration
    public ButtonControl secondaryClick { get; }
    Property Value
    Type Description
    ButtonControl

    tertiaryClick

    Tertiary mouse button (scroll wheel button or middle button). Returns true when pressed.

    Declaration
    public ButtonControl tertiaryClick { get; }
    Property Value
    Type Description
    ButtonControl

    Methods

    FinishSetup()

    Perform final initialization tasks after the control hierarchy has been put into place.

    Declaration
    protected override void FinishSetup()
    Overrides
    UnityEngine.InputSystem.InputControl.FinishSetup()
    Remarks

    This method can be overridden to perform control- or device-specific setup work. The most common use case is for looking up child controls and storing them in local getters.

    Examples
      public class MyDevice : InputDevice
                            {
                                public ButtonControl button { get; private set; }
                                public AxisControl axis { get; private set; }
    
                                protected override void OnFinishSetup()
                                {
                                    // Cache controls in getters.
                                    button = GetChildControl("button");
                                    axis = GetChildControl("axis");
                                }
                            }
    
    In This Article
    Back to top
    Copyright © 2026 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)