Skip to content

Commit 886704d

Browse files
committed
Add SupportedUnityXRPipelines to MixedRealityControllerAttribute
1 parent b38304a commit 886704d

19 files changed

+44
-19
lines changed

Assets/MRTK/Core/Attributes/MixedRealityControllerAttribute.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,26 @@ public class MixedRealityControllerAttribute : Attribute
3838
/// </summary>
3939
public MixedRealityControllerConfigurationFlags Flags { get; }
4040

41+
/// <summary>
42+
/// Additional flags for configuring controller capabilities.
43+
/// </summary>
44+
public SupportedUnityXRPipelines SupportedUnityXRPipelines { get; }
45+
4146
/// <summary>
4247
///
4348
/// </summary>
4449
public MixedRealityControllerAttribute(
4550
SupportedControllerType supportedControllerType,
4651
Handedness[] supportedHandedness,
4752
string texturePath = "",
48-
MixedRealityControllerConfigurationFlags flags = 0)
53+
MixedRealityControllerConfigurationFlags flags = 0,
54+
SupportedUnityXRPipelines supportedUnityXRPipelines = (SupportedUnityXRPipelines)(-1))
4955
{
5056
SupportedControllerType = supportedControllerType;
5157
SupportedHandedness = supportedHandedness;
5258
TexturePath = texturePath;
5359
Flags = flags;
60+
SupportedUnityXRPipelines = supportedUnityXRPipelines;
5461
}
5562

5663
/// <summary>

Assets/MRTK/Providers/Oculus/XRSDK/Controllers/OculusXRSDKTouchController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ namespace Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input
1818
[MixedRealityController(
1919
SupportedControllerType.OculusTouch,
2020
new[] { Handedness.Left, Handedness.Right },
21-
"Textures/OculusControllersTouch")]
21+
"Textures/OculusControllersTouch",
22+
supportedUnityXRPipelines: SupportedUnityXRPipelines.XRSDK)]
2223
public class OculusXRSDKTouchController : GenericXRSDKController
2324
{
2425
/// <summary>

Assets/MRTK/Providers/Oculus/XRSDK/MRTK-Quest/Scripts/Input/Controllers/OculusHand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ namespace Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input
4444
/// </summary>
4545
[MixedRealityController(
4646
SupportedControllerType.ArticulatedHand,
47-
new[] { Handedness.Left, Handedness.Right })]
47+
new[] { Handedness.Left, Handedness.Right },
48+
supportedUnityXRPipelines: SupportedUnityXRPipelines.XRSDK)]
4849
public class OculusHand : BaseHand
4950
{
5051
private MixedRealityPose currentPointerPose = MixedRealityPose.ZeroIdentity;

Assets/MRTK/Providers/OpenVR/GenericOpenVRController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1515
[MixedRealityController(
1616
SupportedControllerType.GenericOpenVR,
1717
new[] { Handedness.Left, Handedness.Right },
18-
flags: MixedRealityControllerConfigurationFlags.UseCustomInteractionMappings)]
18+
flags: MixedRealityControllerConfigurationFlags.UseCustomInteractionMappings,
19+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1920
public class GenericOpenVRController : GenericJoystickController
2021
{
2122
public GenericOpenVRController(

Assets/MRTK/Providers/OpenVR/HPMotionController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1212
/// </summary>
1313
[MixedRealityController(
1414
SupportedControllerType.HPMotionController,
15-
new[] { Handedness.Left, Handedness.Right })]
15+
new[] { Handedness.Left, Handedness.Right },
16+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1617
public class HPMotionController : GenericOpenVRController
1718
{
1819
/// <summary>

Assets/MRTK/Providers/OpenVR/OculusRemoteController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1010
[MixedRealityController(
1111
SupportedControllerType.OculusRemote,
1212
new[] { Handedness.None },
13-
"Textures/OculusRemoteController")]
13+
"Textures/OculusRemoteController",
14+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1415
public class OculusRemoteController : GenericOpenVRController
1516
{
1617
/// <summary>

Assets/MRTK/Providers/OpenVR/OculusTouchController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1010
[MixedRealityController(
1111
SupportedControllerType.OculusTouch,
1212
new[] { Handedness.Left, Handedness.Right },
13-
"Textures/OculusControllersTouch")]
13+
"Textures/OculusControllersTouch",
14+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1415
public class OculusTouchController : GenericOpenVRController
1516
{
1617
/// <summary>

Assets/MRTK/Providers/OpenVR/ViveKnucklesController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
99
{
1010
[MixedRealityController(
1111
SupportedControllerType.ViveKnuckles,
12-
new[] { Handedness.Left, Handedness.Right })]
12+
new[] { Handedness.Left, Handedness.Right },
13+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1314
public class ViveKnucklesController : GenericOpenVRController
1415
{
1516
/// <summary>

Assets/MRTK/Providers/OpenVR/ViveWandController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1010
[MixedRealityController(
1111
SupportedControllerType.ViveWand,
1212
new[] { Handedness.Left, Handedness.Right },
13-
"Textures/ViveWandController")]
13+
"Textures/ViveWandController",
14+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1415
public class ViveWandController : GenericOpenVRController
1516
{
1617
/// <summary>

Assets/MRTK/Providers/OpenVR/WindowsMixedRealityOpenVRMotionController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1313
[MixedRealityController(
1414
SupportedControllerType.WindowsMixedReality,
1515
new[] { Handedness.Left, Handedness.Right },
16-
"Textures/MotionController")]
16+
"Textures/MotionController",
17+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1718
public class WindowsMixedRealityOpenVRMotionController : GenericOpenVRController
1819
{
1920
/// <summary>

0 commit comments

Comments
 (0)