Class MockAdditiveFeature
Inheritance
MockAdditiveFeature
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.OpenXR.Tests
Assembly: Unity.XR.OpenXR.Tests.dll
Syntax
[OpenXRFeature(UiName = "Mock Meta Controller", BuildTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Standalone, BuildTargetGroup.Android }, Company = "MockUnity", Desc = "Adds a mock additive pose/button to a new controller profile.", Version = "0.0.1", Category = "Feature", Hidden = true, FeatureId = "com.unity.openxr.feature.input.partner.additive")]
public class MockAdditiveFeature : OpenXRInteractionFeature
Fields
MergeDetails
Stores merged additive actions for all features (used for testing).
Declaration
public static readonly List<(string profile, List<(string name, string type, List<string> bindPaths, bool isAdditive)>)> MergeDetails
Field Value
| Type | Description |
|---|---|
| List<(string profile, List<(string name, string type, List<string> bindPaths, bool isAdditive)>)> |
mockAuxButtonPath
The OpenXR path representing the mock auxiliary button action.
Declaration
public const string mockAuxButtonPath = "/input/aux_ext/click"
Field Value
| Type | Description |
|---|---|
| string |
mockThumbPosePath
The OpenXR path representing the mock thumb pose action.
Declaration
public const string mockThumbPosePath = "/input/thumb_ext/pose"
Field Value
| Type | Description |
|---|---|
| string |
targetProfile
The target interaction profile name.
Declaration
public const string targetProfile = "/interaction_profiles/mockmeta/controller"
Field Value
| Type | Description |
|---|---|
| string |
Properties
IsAdditive
A flag to mark this feature as additive.
Declaration
protected override bool IsAdditive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
m_AdditiveMap
The additive action map configuration for this mock feature.
Declaration
protected OpenXRInteractionFeature.ActionMapConfig m_AdditiveMap { get; set; }
Property Value
| Type | Description |
|---|---|
| OpenXRInteractionFeature.ActionMapConfig |
Methods
AddAdditiveActions(List<ActionMapConfig>, ActionMapConfig)
Processes additive actions to add to an existing controller. This function has to copy values to merge details in order to see if actions were merged correctly.
Declaration
protected override void AddAdditiveActions(List<OpenXRInteractionFeature.ActionMapConfig> actionMaps, OpenXRInteractionFeature.ActionMapConfig additiveMap)
Parameters
| Type | Name | Description |
|---|---|---|
| List<OpenXRInteractionFeature.ActionMapConfig> | actionMaps | Action maps to extend. |
| OpenXRInteractionFeature.ActionMapConfig | additiveMap | The additive map to merge. |
Overrides
GetDeviceLayoutName()
Name of the device layout associated with this mock feature.
Declaration
protected override string GetDeviceLayoutName()
Returns
| Type | Description |
|---|---|
| string | Returns string with device layout name. |
Overrides
RegisterActionMapsWithRuntime()
Registers thumb pose and aux click.
Declaration
protected override void RegisterActionMapsWithRuntime()