Skip to content

Commit b38304a

Browse files
committed
Add SupportedUnityXRPipelines
1 parent 95f9e89 commit b38304a

17 files changed

+53
-21
lines changed

Assets/MRTK/Core/Attributes/MixedRealityDataProviderAttribute.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,31 @@ namespace Microsoft.MixedReality.Toolkit
99
/// <summary>
1010
/// Attribute that defines the properties of a Mixed Reality Toolkit data provider.
1111
/// </summary>
12-
[AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)]
12+
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
1313
public class MixedRealityDataProviderAttribute : MixedRealityExtensionServiceAttribute
1414
{
1515
/// <summary>
1616
/// The interface type of the IMixedRealityService for which the data provider is supported.
1717
/// </summary>
1818
public Type ServiceInterfaceType { get; }
1919

20+
/// <summary>
21+
///
22+
/// </summary>
23+
public SupportedUnityXRPipelines SupportedUnityXRPipelines { get; }
24+
2025
public MixedRealityDataProviderAttribute(
2126
Type serviceInterfaceType,
2227
SupportedPlatforms runtimePlatforms,
2328
string name = "",
2429
string profilePath = "",
2530
string packageFolder = "MixedRealityToolkit",
26-
bool requiresProfile = false) : base(runtimePlatforms, name, profilePath, packageFolder, requiresProfile)
31+
bool requiresProfile = false,
32+
SupportedUnityXRPipelines supportedUnityXRPipelines = (SupportedUnityXRPipelines)(-1))
33+
: base(runtimePlatforms, name, profilePath, packageFolder, requiresProfile)
2734
{
2835
ServiceInterfaceType = serviceInterfaceType;
36+
SupportedUnityXRPipelines = supportedUnityXRPipelines;
2937
}
3038
}
3139
}

Assets/MRTK/Core/Definitions/Utilities/SupportedPlatforms.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ public enum SupportedPlatforms
2323
Web = 1 << 9,
2424
Lumin = 1 << 10
2525
}
26+
27+
[Flags]
28+
public enum SupportedUnityXRPipelines
29+
{
30+
LegacyXR = 1 << 0,
31+
XRSDK = 1 << 1,
32+
}
2633
}

Assets/MRTK/Core/Providers/UnityInput/UnityJoystickManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ namespace Microsoft.MixedReality.Toolkit.Input.UnityInput
1717
[MixedRealityDataProvider(
1818
typeof(IMixedRealityInputSystem),
1919
(SupportedPlatforms)(-1), // All platforms supported by Unity
20-
"Unity Joystick Manager")]
20+
"Unity Joystick Manager",
21+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
2122
public class UnityJoystickManager : BaseInputDeviceManager
2223
{
2324
/// <summary>

Assets/MRTK/Providers/Oculus/XRSDK/OculusXRSDKDeviceManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input
2727
"XR SDK Oculus Device Manager",
2828
"Oculus/XRSDK/Profiles/DefaultOculusXRSDKDeviceManagerProfile.asset",
2929
"MixedRealityToolkit.Providers",
30-
requiresProfile: true)]
30+
true,
31+
SupportedUnityXRPipelines.XRSDK)]
3132
public class OculusXRSDKDeviceManager : XRSDKDeviceManager
3233
{
3334
/// <summary>

Assets/MRTK/Providers/OpenVR/OpenVRDeviceManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace Microsoft.MixedReality.Toolkit.OpenVR.Input
1616
[MixedRealityDataProvider(
1717
typeof(IMixedRealityInputSystem),
1818
SupportedPlatforms.WindowsStandalone | SupportedPlatforms.MacStandalone | SupportedPlatforms.LinuxStandalone,
19-
"OpenVR Device Manager")]
19+
"OpenVR Device Manager",
20+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
2021
public class OpenVRDeviceManager : UnityJoystickManager, IMixedRealityCapabilityCheck
2122
{
2223
/// <summary>

Assets/MRTK/Providers/WindowsMixedReality/Shared/BaseWindowsMixedRealityCameraSettings.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
99
/// <summary>
1010
/// Camera settings provider for use with Windows Mixed Reality.
1111
/// </summary>
12-
[MixedRealityDataProvider(
13-
typeof(IMixedRealityCameraSystem),
14-
SupportedPlatforms.WindowsUniversal,
15-
"Windows Mixed Reality Camera Settings",
16-
"WindowsMixedReality/Shared/Profiles/DefaultWindowsMixedRealityCameraSettingsProfile.asset",
17-
"MixedRealityToolkit.Providers")]
1812
public abstract class BaseWindowsMixedRealityCameraSettings : BaseCameraSettingsProvider, IMixedRealityCameraProjectionOverrideProvider
1913
{
2014
/// <summary>

Assets/MRTK/Providers/WindowsMixedReality/XR2018/WindowsMixedRealityCameraSettings.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33

44
using Microsoft.MixedReality.Toolkit.CameraSystem;
5+
using Microsoft.MixedReality.Toolkit.Utilities;
56

67
#if UNITY_WSA
78
using UnityEngine.XR.WSA;
@@ -12,6 +13,13 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
1213
/// <summary>
1314
/// Camera settings provider for use with Windows Mixed Reality.
1415
/// </summary>
16+
[MixedRealityDataProvider(
17+
typeof(IMixedRealityCameraSystem),
18+
SupportedPlatforms.WindowsUniversal,
19+
"Windows Mixed Reality Camera Settings",
20+
"WindowsMixedReality/Shared/Profiles/DefaultWindowsMixedRealityCameraSettingsProfile.asset",
21+
"MixedRealityToolkit.Providers",
22+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
1523
public class WindowsMixedRealityCameraSettings : BaseWindowsMixedRealityCameraSettings
1624
{
1725
/// <summary>

Assets/MRTK/Providers/WindowsMixedReality/XR2018/WindowsMixedRealityDeviceManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input
3737
[MixedRealityDataProvider(
3838
typeof(IMixedRealityInputSystem),
3939
SupportedPlatforms.WindowsUniversal,
40-
"Windows Mixed Reality Device Manager")]
40+
"Windows Mixed Reality Device Manager",
41+
supportedUnityXRPipelines: SupportedUnityXRPipelines.LegacyXR)]
4142
public class WindowsMixedRealityDeviceManager : BaseInputDeviceManager, IMixedRealityCapabilityCheck
4243
{
4344
/// <summary>

Assets/MRTK/Providers/WindowsMixedReality/XR2018/WindowsMixedRealityEyeGazeDataProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input
2525
SupportedPlatforms.WindowsUniversal,
2626
"Windows Mixed Reality Eye Gaze Provider",
2727
"Profiles/DefaultMixedRealityEyeTrackingProfile.asset", "MixedRealityToolkit.SDK",
28-
true)]
28+
true,
29+
SupportedUnityXRPipelines.LegacyXR)]
2930
public class WindowsMixedRealityEyeGazeDataProvider : BaseInputDeviceManager, IMixedRealityEyeGazeDataProvider, IMixedRealityEyeSaccadeProvider, IMixedRealityCapabilityCheck
3031
{
3132
/// <summary>

Assets/MRTK/Providers/WindowsMixedReality/XR2018/WindowsMixedRealitySpatialMeshObserver.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality.SpatialAwareness
2525
"Windows Mixed Reality Spatial Mesh Observer",
2626
"Profiles/DefaultMixedRealitySpatialAwarenessMeshObserverProfile.asset",
2727
"MixedRealityToolkit.SDK",
28-
true)]
28+
true,
29+
SupportedUnityXRPipelines.LegacyXR)]
2930
[HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/spatial-awareness-getting-started")]
3031
public class WindowsMixedRealitySpatialMeshObserver :
3132
BaseSpatialMeshObserver,

0 commit comments

Comments
 (0)