Class AndroidMouseInteractionProfile.AndroidMouseInteraction
An InputDevice representing an Android mouse that supports interaction in OpenXR.
Inherited Members
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
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");
}
}