Skip to content

Commit 6725dcf

Browse files
committed
Remove Unity 2018 support for scene understanding
1 parent 8201d76 commit 6725dcf

File tree

5 files changed

+14
-51
lines changed

5 files changed

+14
-51
lines changed

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/Editor/MRTK.WSU.Editor.asmdef

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@
1515
"overrideReferences": false,
1616
"precompiledReferences": [],
1717
"autoReferenced": true,
18-
"defineConstraints": []
18+
"defineConstraints": [
19+
"UNITY_2019_4_OR_NEWER"
20+
],
21+
"versionDefines": [],
22+
"noEngineReferences": false
1923
}

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/Editor/WindowsSceneUnderstandingConfigChecker.cs

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

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/Editor/WindowsSceneUnderstandingConfigChecker.cs.meta

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

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/MRTK.WSU.asmdef

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"overrideReferences": false,
1818
"precompiledReferences": [],
1919
"autoReferenced": true,
20-
"defineConstraints": [],
20+
"defineConstraints": [
21+
"UNITY_2019_4_OR_NEWER"
22+
],
2123
"versionDefines": [
2224
{
2325
"name": "com.microsoft.mixedreality.sceneunderstanding",

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/WindowsSceneUnderstandingObserver.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ public override void Reset()
113113
/// <inheritdoc />
114114
public override void Initialize()
115115
{
116-
base.Initialize();
117116
#if !SCENE_UNDERSTANDING_PRESENT
118117
if (Application.isPlaying)
119118
{
120119
Debug.LogWarning("The required package Microsoft.MixedReality.SceneUnderstanding is not installed or properly configured. Please visit https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/spatial-awareness/scene-understanding for more information.");
121120
}
122121
#else
122+
base.Initialize();
123123
sceneEventData = new MixedRealitySpatialAwarenessEventData<SpatialAwarenessSceneObject>(EventSystem.current);
124124
CreateQuadFromExtents(normalizedQuadMesh, 1, 1);
125125

@@ -142,17 +142,20 @@ public override void Initialize()
142142
#endif // SCENE_UNDERSTANDING_PRESENT
143143
}
144144

145-
#if SCENE_UNDERSTANDING_PRESENT
146-
147145
/// <inheritdoc />
148146
public override void Enable()
149147
{
148+
#if SCENE_UNDERSTANDING_PRESENT
149+
base.Enable();
150150
// Terminate the background thread when we stop in editor.
151151
cancelToken = cancelTokenSource.Token;
152152

153153
task = Task.Run(() => RunObserverAsync(cancelToken));
154+
#endif // SCENE_UNDERSTANDING_PRESENT
154155
}
155156

157+
#if SCENE_UNDERSTANDING_PRESENT
158+
156159
/// <inheritdoc />
157160
public override void Update()
158161
{

0 commit comments

Comments
 (0)