Class HandInteractionProfileMicrogestures
An additive interaction feature that binds to the microgesture inputs the XR_META_hand_tracking_microgestures OpenXR extension adds to the Hand Interaction Profile.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Interactions
Assembly: Unity.XR.OpenXR.dll
Syntax
public class HandInteractionProfileMicrogestures : OpenXRInteractionFeature
Remarks
This feature requires the HandInteractionProfile feature. When the runtime supports the extension, Unity creates a HandInteractionProfileMicrogestures.HandInteractionMicrogestures device for each hand, which exposes the microgesture controls.
For more information, refer to [Hand Interaction Profile Microgestures](xref:openxr-hand-interaction-profile-microgestures).
Fields
extensionString
The name of the OpenXR extension that this feature requires.
Declaration
public const string extensionString = "XR_META_hand_tracking_microgestures"
Field Value
| Type | Description |
|---|---|
| string |
See Also
featureId
The unique ID of this feature.
Declaration
public const string featureId = "com.unity.openxr.feature.input.handinteractionmicrogestures"
Field Value
| Type | Description |
|---|---|
| string |
See Also
profile
The OpenXR interaction profile path that the microgesture bindings use. Equal to profile.
Declaration
public const string profile = "/interaction_profiles/ext/hand_interaction_ext"
Field Value
| Type | Description |
|---|---|
| string |
See Also
swipeBackward
The OpenXR component path of the swipe backward microgesture input.
Declaration
public const string swipeBackward = "/input/swipe_backward_meta/click"
Field Value
| Type | Description |
|---|---|
| string |
See Also
swipeForward
The OpenXR component path of the swipe forward microgesture input.
Declaration
public const string swipeForward = "/input/swipe_forward_meta/click"
Field Value
| Type | Description |
|---|---|
| string |
See Also
swipeLeft
The OpenXR component path of the swipe left microgesture input.
Declaration
public const string swipeLeft = "/input/swipe_left_meta/click"
Field Value
| Type | Description |
|---|---|
| string |
See Also
swipeRight
The OpenXR component path of the swipe right microgesture input.
Declaration
public const string swipeRight = "/input/swipe_right_meta/click"
Field Value
| Type | Description |
|---|---|
| string |
See Also
tapThumb
The OpenXR component path of the thumb tap microgesture input.
Declaration
public const string tapThumb = "/input/tap_thumb_meta/click"
Field Value
| Type | Description |
|---|---|
| string |
See Also
Properties
IsAdditive
Whether this feature adds its actions to other enabled interaction profiles instead of acting as an interaction profile on its own.
Declaration
protected override bool IsAdditive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Remarks
Always true. This feature adds its actions to the Hand Interaction Profile.
See Also
Methods
AddAdditiveActions(List<ActionMapConfig>, ActionMapConfig)
Adds the microgesture actions to each enabled Hand Interaction Profile action map.
Declaration
protected override void AddAdditiveActions(List<OpenXRInteractionFeature.ActionMapConfig> actionMaps, OpenXRInteractionFeature.ActionMapConfig additiveMap)
Parameters
| Type | Name | Description |
|---|---|---|
| List<OpenXRInteractionFeature.ActionMapConfig> | actionMaps | Action maps from all enabled non-additive interaction profiles. |
| OpenXRInteractionFeature.ActionMapConfig | additiveMap | This feature's action map, which contains the microgesture actions to add. |
Overrides
Remarks
Unity calls this method during OpenXR initialization when this feature is enabled. Action maps for other interaction profiles are unchanged.
See Also
GetDeviceLayoutName()
Obtains the name of the device layout that this feature registers with the Input System.
Declaration
protected override string GetDeviceLayoutName()
Returns
| Type | Description |
|---|---|
| string | The name of the HandInteractionProfileMicrogestures.HandInteractionMicrogestures layout. |
Overrides
See Also
GetInteractionProfileType()
Returns InteractionProfileType.Device, because HandInteractionProfileMicrogestures.HandInteractionMicrogestures isn't an XRController.
Declaration
protected override OpenXRInteractionFeature.InteractionProfileType GetInteractionProfileType()
Returns
| Type | Description |
|---|---|
| OpenXRInteractionFeature.InteractionProfileType | The interaction profile type. |
Overrides
See Also
GetValidationChecks(List<ValidationRule>, BuildTargetGroup)
Adds a validation rule that requires the Hand Interaction Profile feature.
Declaration
protected override void GetValidationChecks(List<OpenXRFeature.ValidationRule> results, BuildTargetGroup target)
Parameters
| Type | Name | Description |
|---|---|---|
| List<OpenXRFeature.ValidationRule> | results | List to add the validation rules to. |
| BuildTargetGroup | target | Build target group to validate. |
Overrides
See Also
OnExtensionsReady(ulong)
Registers the HandInteractionProfileMicrogestures.HandInteractionMicrogestures layout with the Input System if the runtime supports the XR_META_hand_tracking_microgestures extension.
Declaration
protected override bool OnExtensionsReady(ulong instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | Handle of the OpenXR instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
See Also
OnInstanceCreate(ulong)
Defers instance setup until OnExtensionsReady(ulong).
Declaration
protected override bool OnInstanceCreate(ulong instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | instance | Handle of the OpenXR instance. |
Returns
| Type | Description |
|---|---|
| bool | Always |
Overrides
See Also
RegisterActionMapsWithRuntime()
Registers the microgesture action map with the runtime.
Declaration
protected override void RegisterActionMapsWithRuntime()
Overrides
See Also
RegisterDeviceLayout()
Registers the HandInteractionProfileMicrogestures.HandInteractionMicrogestures layout with the Input System.
Declaration
protected override void RegisterDeviceLayout()
Overrides
See Also
UnregisterDeviceLayout()
Removes the HandInteractionProfileMicrogestures.HandInteractionMicrogestures layout from the Input System.
Declaration
protected override void UnregisterDeviceLayout()