File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Assets/MRTK/Examples/Experimental/ExamplesHub/Scripts Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change 5
5
using System . Collections ;
6
6
using System . Collections . Generic ;
7
7
using UnityEngine ;
8
-
9
- public class SceneSystemUnloadingCheck : MonoBehaviour
8
+ namespace Microsoft . MixedReality . Toolkit . Examples . Demos
10
9
{
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
16
11
{
17
- IMixedRealitySceneSystem sceneSystem = MixedRealityToolkit . Instance . GetService < IMixedRealitySceneSystem > ( ) ;
18
- sceneSystem . OnWillUnloadContent += HandleSceneOperation ;
19
- }
12
+ public DemoSceneUnderstandingController SUController ;
13
+ private bool isCleared = false ;
20
14
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 )
24
22
{
25
- SUController . ClearScene ( ) ;
26
- isCleared = true ;
23
+ if ( isCleared == false )
24
+ {
25
+ SUController . ClearScene ( ) ;
26
+ isCleared = true ;
27
+ }
27
28
}
28
29
}
29
- }
30
+ }
You can’t perform that action at this time.
0 commit comments