Class OpenXRInteractionFeature
A Unity OpenXR Interaction feature. This class can be inherited from to add a custom action mapping for OpenXR.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features
Assembly: Unity.XR.OpenXR.dll
Syntax
[Serializable]
public abstract class OpenXRInteractionFeature : OpenXRFeature
Methods
AddActionMap(ActionMapConfig)
Add an action map to the Unity Input System.
This method must be called from within the RegisterActionMapsWithRuntime method.
Declaration
protected void AddActionMap(OpenXRInteractionFeature.ActionMapConfig map)
Parameters
Type | Name | Description |
---|---|---|
OpenXRInteractionFeature.ActionMapConfig | map | Action map to add |
GetDeviceLayoutName()
Return device layout name string used for register layouts in inputSystem.
Declaration
protected virtual string GetDeviceLayoutName()
Returns
Type | Description |
---|---|
string | Device layout string. |
GetInteractionProfileType()
Return interaction profile type. Default type is XRController. Override this if interactionProfile is not derived from XRController class.
Declaration
protected virtual OpenXRInteractionFeature.InteractionProfileType GetInteractionProfileType()
Returns
Type | Description |
---|---|
OpenXRInteractionFeature.InteractionProfileType | Interaction profile type. |
OnEnabledChange()
Handle enabled state change
Declaration
protected override void OnEnabledChange()
Overrides
OnInstanceCreate(ulong)
Called after xrCreateInstance.
Declaration
protected override bool OnInstanceCreate(ulong xrSession)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
Returns
Type | Description |
---|---|
bool |
Overrides
RegisterActionMapsWithRuntime()
Register action maps for this device with the OpenXR Runtime. Called at runtime before Start.
Declaration
protected virtual void RegisterActionMapsWithRuntime()
RegisterDeviceLayout()
Register a device layout with the Unity Input System. Called whenever this interaction profile is enabled in the Editor.
Declaration
protected virtual void RegisterDeviceLayout()
UnregisterDeviceLayout()
Remove a device layout from the Unity Input System. Called whenever this interaction profile is disabled in the Editor.
Declaration
protected virtual void UnregisterDeviceLayout()