Class AndroidMouseInteractionProfile
This OpenXRInteractionFeature enables the use of Android mouse interaction profiles in OpenXR. It provides support for mouse and trackpad devices in Android XR applications, enabling 3D pointer ray interactions.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Interactions
Assembly: Unity.XR.OpenXR.dll
Syntax
public class AndroidMouseInteractionProfile : OpenXRInteractionFeature
Fields
aimPath
The OpenXR input path for the aim pose. Used for 3D pointer ray interactions.
Declaration
public const string aimPath = "/input/aim/pose"
Field Value
| Type | Description |
|---|---|
| string |
clickPath
The OpenXR input path for the primary mouse button (select/click).
Declaration
public const string clickPath = "/input/select/click"
Field Value
| Type | Description |
|---|---|
| string |
extensionString
The OpenXR Extension string. This is used by the OpenXR runtime to check if the extension is available or enabled.
Declaration
public const string extensionString = "XR_ANDROID_mouse_interaction"
Field Value
| Type | Description |
|---|---|
| string |
featureId
The feature id string. This is used to uniquely identify this feature in the OpenXR runtime.
Declaration
public const string featureId = "com.unity.openxr.feature.input.androidmouse"
Field Value
| Type | Description |
|---|---|
| string |
profile
The interaction profile path string for the Android mouse interaction profile.
Declaration
public const string profile = "/interaction_profiles/android/mouse_interaction_android"
Field Value
| Type | Description |
|---|---|
| string |
scrollPath
The OpenXR input path for the scroll wheel value.
Declaration
public const string scrollPath = "/input/scroll_android/value"
Field Value
| Type | Description |
|---|---|
| string |
secondaryClickPath
The OpenXR input path for the secondary mouse button (right-click).
Declaration
public const string secondaryClickPath = "/input/secondary_android/click"
Field Value
| Type | Description |
|---|---|
| string |
tertiaryClickPath
The OpenXR input path for the tertiary mouse button (scroll wheel button/middle button).
Declaration
public const string tertiaryClickPath = "/input/tertiary_android/click"
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetDeviceLayoutName()
Return device layout string that used for registering device in InputSystem.
Declaration
protected override string GetDeviceLayoutName()
Returns
| Type | Description |
|---|---|
| string | Device layout string. |
Overrides
GetInteractionProfileType()
Return Interaction profile type.
Declaration
protected override OpenXRInteractionFeature.InteractionProfileType GetInteractionProfileType()
Returns
| Type | Description |
|---|---|
| OpenXRInteractionFeature.InteractionProfileType | Interaction profile type. |
Overrides
OnInstanceCreate(ulong)
Called after xrCreateInstance. Override this method to validate that any necessary OpenXR extensions were
successfully enabled (OpenXRRuntime.IsExtensionEnabled)
and that any required system properties are supported. If this method returns false,
the feature's enabled property is set to false.
Declaration
protected override bool OnInstanceCreate(ulong instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance |
Returns
| Type | Description |
|---|---|
| bool | true if this feature successfully initialized. Otherwise, false. |
Overrides
Remarks
If this feature is a required feature of an enabled feature set, returning false here
causes the OpenXRLoader to fail, and XR Plug-in Management will fall back to another loader if enabled.
See Also
RegisterActionMapsWithRuntime()
Register action maps for this device with the OpenXR Runtime. Called at runtime before Start.
Declaration
protected override void RegisterActionMapsWithRuntime()
Overrides
RegisterDeviceLayout()
Registers the AndroidMouseInteractionProfile.AndroidMouseInteraction layout with the Input System.
Declaration
protected override void RegisterDeviceLayout()
Overrides
UnregisterDeviceLayout()
Removes the AndroidMouseInteractionProfile.AndroidMouseInteraction layout from the Input System.
Declaration
protected override void UnregisterDeviceLayout()