Skip to content

Commit aba6598

Browse files
committed
Added namespace scope
1 parent a430e0f commit aba6598

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

Assets/MRTK/Examples/Experimental/ExamplesHub/Scripts/SceneSystemUnloadingCheck.cs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@
55
using System.Collections;
66
using System.Collections.Generic;
77
using UnityEngine;
8-
9-
public class SceneSystemUnloadingCheck : MonoBehaviour
8+
namespace Microsoft.MixedReality.Toolkit.Examples.Demos
109
{
11-
public DemoSceneUnderstandingController SUController;
12-
private bool isCleared = false;
13-
14-
// Start is called before the first frame update
15-
void Start()
10+
public class SceneSystemUnloadingCheck : MonoBehaviour
1611
{
17-
IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService<IMixedRealitySceneSystem>();
18-
sceneSystem.OnWillUnloadContent += HandleSceneOperation;
19-
}
12+
public DemoSceneUnderstandingController SUController;
13+
private bool isCleared = false;
2014

21-
private void HandleSceneOperation(IEnumerable<string> obj)
22-
{
23-
if(isCleared == false)
15+
void Start()
16+
{
17+
IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit.Instance.GetService<IMixedRealitySceneSystem>();
18+
sceneSystem.OnWillUnloadContent += HandleSceneOperation;
19+
}
20+
21+
private void HandleSceneOperation(IEnumerable<string> obj)
2422
{
25-
SUController.ClearScene();
26-
isCleared = true;
23+
if (isCleared == false)
24+
{
25+
SUController.ClearScene();
26+
isCleared = true;
27+
}
2728
}
2829
}
29-
}
30+
}

0 commit comments

Comments
 (0)