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.
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
Field Value
| Type | Description |
|---|---|
| string |
clickPath
The OpenXR input path for the primary mouse button (select/click).
Declaration
public const string clickPath
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
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
Field Value
| Type | Description |
|---|---|
| string |
profile
The interaction profile path string for the Android mouse interaction profile.
Declaration
public const string profile
Field Value
| Type | Description |
|---|---|
| string |
scrollPath
The OpenXR input path for the scroll wheel value.
Declaration
public const string scrollPath
Field Value
| Type | Description |
|---|---|
| string |
secondaryClickPath
The OpenXR input path for the secondary mouse button (right-click).
Declaration
public const string secondaryClickPath
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
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
OnExtensionsReady(ulong)
Called when all extensions are ready. Some systems may require enumeration of optional extension availability at the OnSystemChange stage.
Override this method to validate that any necessary OpenXR extensions were successfully enabled (OpenXRRuntime.IsSystemExtensionEnabled) 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 OnExtensionsReady(ulong instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance |
Returns
| Type | Description |
|---|---|
| bool | true if this feature successfully initialized. Otherwise, false. |
Overrides
Remarks
This cannot be used with loader-required features as required extensions must be available at OnInstanceCreate(ulong). Therefore, failures that return false will simply disable the feature, not the loader.
See Also
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()