@@ -34,11 +34,11 @@ public static bool XRSDKEnabled
34
34
{
35
35
get
36
36
{
37
- #if UNITY_2019_3_OR_NEWER && XR_MANAGEMENT_ENABLED
37
+ #if XR_MANAGEMENT_ENABLED
38
38
return XRSDKLoadersOfCurrentBuildTarget . Count > 0 ;
39
39
#else
40
40
return false ;
41
- #endif // UNITY_2019_3_OR_NEWER && XR_MANAGEMENT_ENABLED
41
+ #endif // XR_MANAGEMENT_ENABLED
42
42
}
43
43
}
44
44
@@ -49,11 +49,11 @@ public static bool MicrosoftOpenXRPresent
49
49
{
50
50
get
51
51
{
52
- #if UNITY_2020_2_OR_NEWER && MSFT_OPENXR
52
+ #if MSFT_OPENXR
53
53
return true ;
54
54
#else
55
55
return false ;
56
- #endif // UNITY_2019_3_OR_NEWER
56
+ #endif // MSFT_OPENXR
57
57
}
58
58
}
59
59
@@ -65,7 +65,7 @@ public static bool MicrosoftOpenXREnabled
65
65
{
66
66
get
67
67
{
68
- #if UNITY_2020_2_OR_NEWER && MSFT_OPENXR
68
+ #if MSFT_OPENXR
69
69
return XRSDKLoadersOfCurrentBuildTarget . Any ( p => p . name . Contains ( "Open XR" ) ) ;
70
70
#else
71
71
return false ;
@@ -80,7 +80,7 @@ public static bool OpenXREnabled
80
80
{
81
81
get
82
82
{
83
- #if UNITY_2020_2_OR_NEWER && XR_MANAGEMENT_ENABLED
83
+ #if XR_MANAGEMENT_ENABLED
84
84
return XRSDKLoadersOfCurrentBuildTarget . Any ( p => p . name . Contains ( "Open XR" ) ) ;
85
85
#else
86
86
return false ;
@@ -149,7 +149,7 @@ public static bool XRManagementPresent
149
149
}
150
150
}
151
151
152
- #if UNITY_2019_3_OR_NEWER
152
+ #if UNITY_2019_3_OR_NEWER && ! UNITY_2020_2_OR_NEWER
153
153
private static bool ? isXRSDKSuppressingLegacyXR = null ;
154
154
155
155
static XRSettingsUtilities ( )
@@ -190,6 +190,8 @@ private static bool IsXRSDKSuppressingLegacyXR
190
190
/// Called when packages are installed or uninstalled, to toggle a new check on XR SDK package installation status.
191
191
/// </summary>
192
192
private static void EditorApplication_projectChanged ( ) => isXRSDKSuppressingLegacyXR = null ;
193
+ #endif // UNITY_2019_3_OR_NEWER && !UNITY_2020_2_OR_NEWER
194
+
193
195
#if XR_MANAGEMENT_ENABLED
194
196
/// <summary>
195
197
/// Retrieves the enabled XRSDK XR loaders (plugins) for the current build target
@@ -206,7 +208,6 @@ private static IReadOnlyList<XRLoader> XRSDKLoadersOfCurrentBuildTarget
206
208
}
207
209
}
208
210
#endif // XR_MANAGEMENT_ENABLED
209
- #endif // UNITY_2019_3_OR_NEWER
210
211
211
212
/// <summary>
212
213
/// Checks if an XR SDK plugin is installed that disables legacy XR. Returns false if so.
0 commit comments