Skip to content

Commit da70b4f

Browse files
author
davidkline-ms
committed
eliminate obsolete warnings related to unity 2019.3.0f6 changes
1 parent e361799 commit da70b4f

File tree

14 files changed

+72
-34
lines changed

14 files changed

+72
-34
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ public bool CheckCapability(MixedRealityCapability capability)
8080
}
8181
else // Pre-Windows 10 1903.
8282
{
83+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
84+
// with legacy requirements.
85+
#pragma warning disable 0618
8386
if (!UnityEngine.XR.WSA.HolographicSettings.IsDisplayOpaque)
87+
#pragma warning restore 0618
8488
{
8589
// HoloLens supports GGV hands
8690
return (capability == MixedRealityCapability.GGVHand);

Assets/MixedRealityToolkit.Providers/XRSDK/Editor/ConfigurationChecker.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/MixedRealityToolkit.Providers/XRSDK/Editor/ConfigurationChecker/Microsoft.MixedReality.Toolkit.Providers.XRSDK.ConfigurationChecker.asmdef

Lines changed: 0 additions & 16 deletions
This file was deleted.

Assets/MixedRealityToolkit.Providers/XRSDK/Editor/ConfigurationChecker/Microsoft.MixedReality.Toolkit.Providers.XRSDK.ConfigurationChecker.asmdef.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

Assets/MixedRealityToolkit.Providers/XRSDK/GenericXRSDKCameraSettings.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using Microsoft.MixedReality.Toolkit.CameraSystem;
55
using Microsoft.MixedReality.Toolkit.Utilities;
66
using UnityEngine;
7+
#if SPATIALTRACKING_ENABLED
78
using UnityEngine.SpatialTracking;
9+
#endif // SPATIALTRACKING_ENABLED
810

911
namespace Microsoft.MixedReality.Toolkit.XRSDK
1012
{
@@ -31,7 +33,9 @@ public GenericXRSDKCameraSettings(
3133
BaseCameraSettingsProfile profile = null) : base(cameraSystem, name, priority, profile)
3234
{ }
3335

36+
#if SPATIALTRACKING_ENABLED
3437
private TrackedPoseDriver trackedPoseDriver = null;
38+
#endif // SPATIALTRACKING_ENABLED
3539

3640
#region IMixedRealityCameraSettings
3741

@@ -63,6 +67,6 @@ public override void Disable()
6367
base.Disable();
6468
}
6569

66-
#endregion IMixedRealityCameraSettings
70+
#endregion IMixedRealityCameraSettings
6771
}
6872
}

Assets/MixedRealityToolkit.Services/BoundarySystem/MixedRealityBoundarySystem.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,15 @@ public override void Initialize()
6161
/// <inheritdoc/>
6262
protected override List<Vector3> GetBoundaryGeometry()
6363
{
64+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
65+
// with legacy requirements.
66+
#pragma warning disable 0618
6467
// Boundaries are supported for Room Scale experiences only.
6568
if (XRDevice.GetTrackingSpaceType() != TrackingSpaceType.RoomScale)
6669
{
6770
return null;
6871
}
72+
#pragma warning restore 0618
6973

7074
// Get the boundary geometry.
7175
var boundaryGeometry = new List<Vector3>(0);
@@ -83,6 +87,9 @@ protected override List<Vector3> GetBoundaryGeometry()
8387
/// </summary>
8488
protected override void SetTrackingSpace()
8589
{
90+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
91+
// with legacy requirements.
92+
#pragma warning disable 0618
8693
TrackingSpaceType trackingSpace;
8794

8895
// In current versions of Unity, there are two types of tracking spaces. For boundaries, if the scale
@@ -112,6 +119,7 @@ protected override void SetTrackingSpace()
112119
{
113120
Debug.LogWarning("Tracking space unable to be set.");
114121
}
122+
#pragma warning restore 0618
115123
}
116124
}
117125
}

Assets/MixedRealityToolkit.Services/InputSystem/Editor/MixedRealityCanvasInspector.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@ private void AllRootCanvases()
163163

164164
EditorGUILayout.Space();
165165

166-
if (PlayerSettings.virtualRealitySupported && (m_RenderMode.enumValueIndex == (int)RenderMode.ScreenSpaceOverlay))
166+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
167+
// with legacy requirements.
168+
#pragma warning disable 0618
169+
if (PlayerSettings.virtualRealitySupported &&
170+
#pragma warning restore 0618
171+
(m_RenderMode.enumValueIndex == (int)RenderMode.ScreenSpaceOverlay))
167172
{
168173
EditorGUILayout.HelpBox("Using a render mode of ScreenSpaceOverlay while VR is enabled will cause the Canvas to continue to incur a rendering cost, even though the Canvas will not be visible in VR.", MessageType.Warning);
169174
}

Assets/MixedRealityToolkit.Tools/OptimizeWindow/MixedRealityOptimizeWindow.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ private void OnGUI()
133133
EditorGUILayout.HelpBox(PerformanceTargetDescriptions[(int)PerfTarget], MessageType.Info);
134134
EditorGUILayout.Space();
135135

136+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
137+
// with legacy requirements.
138+
#pragma warning disable 0618
136139
if (!PlayerSettings.virtualRealitySupported)
137140
{
138141
EditorGUILayout.HelpBox("Virtual reality support is not enabled in player settings", MessageType.Error);
@@ -141,6 +144,7 @@ private void OnGUI()
141144
PlayerSettings.virtualRealitySupported = true;
142145
}
143146
}
147+
#pragma warning disable 0618
144148
else
145149
{
146150
selectedToolbarIndex = GUILayout.Toolbar(selectedToolbarIndex, ToolbarTitles);

Assets/MixedRealityToolkit/Inspectors/Setup/MixedRealityEditorSettings.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ private static void ShowProjectConfigurationDialog()
8181
/// </summary>
8282
private static void LogConfigurationWarnings()
8383
{
84+
// Ensure compatibility with the pre-2019.3 XR architecture for customers / platforms
85+
// with legacy requirements.
86+
#pragma warning disable 0618
8487
if (!PlayerSettings.virtualRealitySupported)
88+
#pragma warning restore 0618
8589
{
8690
Debug.LogWarning("<b>Virtual reality supported</b> not enabled. Check <i>XR Settings</i> under <i>Player Settings</i>");
8791
}

Assets/MixedRealityToolkit.Providers/XRSDK/Editor.meta renamed to Assets/MixedRealityToolkit/Utilities/Editor/ConfigurationCheckers.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)