@@ -30,7 +30,7 @@ public class MixedRealityProjectConfiguratorWindow : EditorWindow
30
30
private readonly GUIContent IgnoreButtonContent = new GUIContent ( "Always Skip Setup" , "This configurator will not show up again unless manually launched by clicking Mixed Reality (menu bar) -> Toolkit -> Utilities -> Configure Project for MRTK\n or this preference modified under Edit -> Project Settings -> Mixed Reality Toolkit" ) ;
31
31
private GUIStyle multiLineButtonStyle ;
32
32
33
- private static ConfigurationStage currentStage
33
+ private static ConfigurationStage CurrentStage
34
34
{
35
35
get => MixedRealityProjectPreferences . ConfiguratorState ;
36
36
set => MixedRealityProjectPreferences . ConfiguratorState = value ;
@@ -71,30 +71,30 @@ private static void ResetNullableBoolState()
71
71
}
72
72
73
73
[ MenuItem ( "Mixed Reality/Toolkit/Utilities/Configure Project for MRTK" , false , 499 ) ]
74
- public static void ShowWindowFromMenu ( )
74
+ private static void ShowWindowFromMenu ( )
75
75
{
76
- currentStage = ConfigurationStage . Init ;
76
+ CurrentStage = ConfigurationStage . Init ;
77
77
ShowWindow ( ) ;
78
78
}
79
79
80
- public static void ShowWindowOnInit ( bool switchToConfigurationStage )
80
+ internal static void ShowWindowOnInit ( bool switchToConfigurationStage )
81
81
{
82
- if ( ! IsOpen && currentStage == ConfigurationStage . Done )
82
+ if ( ! IsOpen && CurrentStage == ConfigurationStage . Done )
83
83
{
84
84
if ( switchToConfigurationStage )
85
85
{
86
- currentStage = ConfigurationStage . ProjectConfiguration ;
86
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
87
87
}
88
88
else
89
89
{
90
- currentStage = ConfigurationStage . Init ;
90
+ CurrentStage = ConfigurationStage . Init ;
91
91
}
92
92
}
93
93
94
94
ShowWindow ( ) ;
95
95
}
96
96
97
- public static void ShowWindow ( )
97
+ private static void ShowWindow ( )
98
98
{
99
99
// There should be only one configurator window open as a "pop-up". If already open, then just force focus on our instance
100
100
if ( IsOpen )
@@ -113,7 +113,7 @@ public static void ShowWindow()
113
113
private void OnGUI ( )
114
114
{
115
115
MixedRealityInspectorUtility . RenderMixedRealityToolkitLogo ( ) ;
116
- if ( currentStage != ConfigurationStage . Done )
116
+ if ( CurrentStage != ConfigurationStage . Done )
117
117
{
118
118
GUILayout . Label ( "Welcome to MRTK!" , MixedRealityStylesUtility . BoldLargeTitleStyle ) ;
119
119
CreateSpace ( 5 ) ;
@@ -129,7 +129,7 @@ private void OnGUI()
129
129
} ;
130
130
131
131
132
- switch ( currentStage )
132
+ switch ( CurrentStage )
133
133
{
134
134
case ConfigurationStage . Init :
135
135
RenderXRPipelineSelection ( ) ;
@@ -195,7 +195,7 @@ private void RenderNoPipeline()
195
195
if ( ! XRSettingsUtilities . LegacyXRAvailable )
196
196
{
197
197
#if UNITY_2020_2_OR_NEWER
198
- currentStage = ConfigurationStage . SelectXRSDKPlugin ;
198
+ CurrentStage = ConfigurationStage . SelectXRSDKPlugin ;
199
199
#else
200
200
currentStage = ConfigurationStage . InstallBuiltinPlugin ;
201
201
#endif // UNITY_2020_2_OR_NEWER
@@ -239,7 +239,7 @@ private void RenderNoPipeline()
239
239
{
240
240
AddUPMPackage ( "com.unity.xr.management" ) ;
241
241
}
242
- currentStage = ConfigurationStage . InstallBuiltinPlugin ;
242
+ CurrentStage = ConfigurationStage . InstallBuiltinPlugin ;
243
243
Repaint ( ) ;
244
244
}
245
245
CreateSpace ( 15 ) ;
@@ -250,7 +250,7 @@ private void RenderNoPipeline()
250
250
#endif // !UNITY_2019_3_OR_NEWER
251
251
252
252
RenderSetupLaterSection ( true , ( ) => {
253
- currentStage = ConfigurationStage . ProjectConfiguration ;
253
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
254
254
Repaint ( ) ;
255
255
} ) ;
256
256
}
@@ -266,7 +266,7 @@ private void RenderLegacyXRPipelineDetected()
266
266
{
267
267
if ( GUILayout . Button ( "Next" ) )
268
268
{
269
- currentStage = ConfigurationStage . ProjectConfiguration ;
269
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
270
270
Repaint ( ) ;
271
271
}
272
272
if ( GUILayout . Button ( "Learn More" ) )
@@ -288,7 +288,7 @@ private void RenderMicrosoftOpenXRPipelineDetected()
288
288
{
289
289
if ( GUILayout . Button ( "Next" ) )
290
290
{
291
- currentStage = ConfigurationStage . ProjectConfiguration ;
291
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
292
292
Repaint ( ) ;
293
293
}
294
294
if ( GUILayout . Button ( "Learn More" ) )
@@ -312,12 +312,12 @@ private void RenderOpenXRPipelineDetected()
312
312
{
313
313
if ( GUILayout . Button ( "Next" ) )
314
314
{
315
- currentStage = ConfigurationStage . ProjectConfiguration ;
315
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
316
316
Repaint ( ) ;
317
317
}
318
318
if ( GUILayout . Button ( "Install Microsoft OpenXR plugin..." ) )
319
319
{
320
- currentStage = ConfigurationStage . InstallMSOpenXR ;
320
+ CurrentStage = ConfigurationStage . InstallMSOpenXR ;
321
321
Repaint ( ) ;
322
322
}
323
323
if ( GUILayout . Button ( "Learn More" ) )
@@ -340,7 +340,7 @@ private void RenderXRSDKBuiltinPluginPipelineDetected()
340
340
{
341
341
if ( GUILayout . Button ( "Next" ) )
342
342
{
343
- currentStage = ConfigurationStage . ProjectConfiguration ;
343
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
344
344
Repaint ( ) ;
345
345
}
346
346
if ( GUILayout . Button ( "Learn More" ) )
@@ -355,7 +355,7 @@ private void RenderSelectXRSDKPlugin()
355
355
{
356
356
if ( XRSettingsUtilities . XRSDKEnabled )
357
357
{
358
- currentStage = ConfigurationStage . Init ;
358
+ CurrentStage = ConfigurationStage . Init ;
359
359
Repaint ( ) ;
360
360
}
361
361
EditorGUILayout . LabelField ( "XR Pipeline Setting - Enabling the XR SDK Pipeline" , EditorStyles . boldLabel ) ;
@@ -369,7 +369,7 @@ private void RenderSelectXRSDKPlugin()
369
369
370
370
#if UNITY_2020_2_OR_NEWER
371
371
AddUPMPackage ( "com.unity.xr.openxr" ) ;
372
- currentStage = ConfigurationStage . InstallOpenXR ;
372
+ CurrentStage = ConfigurationStage . InstallOpenXR ;
373
373
#endif // UNITY_2020_2_OR_NEWER
374
374
Repaint ( ) ;
375
375
}
@@ -383,7 +383,7 @@ private void RenderSelectXRSDKPlugin()
383
383
AddUPMPackage ( "com.unity.xr.management" ) ;
384
384
}
385
385
#endif // UNITY_2019_3_OR_NEWER
386
- currentStage = ConfigurationStage . InstallBuiltinPlugin ;
386
+ CurrentStage = ConfigurationStage . InstallBuiltinPlugin ;
387
387
Repaint ( ) ;
388
388
}
389
389
CreateSpace ( 25 ) ;
@@ -395,7 +395,7 @@ private void RenderSelectXRSDKPlugin()
395
395
}
396
396
397
397
RenderSetupLaterSection ( true , ( ) => {
398
- currentStage = ConfigurationStage . ProjectConfiguration ;
398
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
399
399
Repaint ( ) ;
400
400
} ) ;
401
401
}
@@ -404,7 +404,7 @@ private void RenderEnableXRSDKBuiltinPlugin()
404
404
{
405
405
if ( XRSettingsUtilities . XRSDKEnabled )
406
406
{
407
- currentStage = ConfigurationStage . Init ;
407
+ CurrentStage = ConfigurationStage . Init ;
408
408
Repaint ( ) ;
409
409
}
410
410
EditorGUILayout . LabelField ( "XR Pipeline Setting - Enabling the XR SDK Pipeline with built-in Plugins (non-OpenXR)" , EditorStyles . boldLabel ) ;
@@ -429,7 +429,7 @@ private void RenderEnableXRSDKBuiltinPlugin()
429
429
}
430
430
}
431
431
RenderSetupLaterSection ( true , ( ) => {
432
- currentStage = ConfigurationStage . ProjectConfiguration ;
432
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
433
433
Repaint ( ) ;
434
434
} ) ;
435
435
}
@@ -438,7 +438,7 @@ private void RenderEnableOpenXRPlugin()
438
438
{
439
439
if ( XRSettingsUtilities . OpenXREnabled )
440
440
{
441
- currentStage = ConfigurationStage . Init ;
441
+ CurrentStage = ConfigurationStage . Init ;
442
442
Repaint ( ) ;
443
443
}
444
444
EditorGUILayout . LabelField ( "XR Pipeline Setting - Enabling the XR SDK Pipeline with OpenXR" , EditorStyles . boldLabel ) ;
@@ -455,7 +455,7 @@ private void RenderEnableOpenXRPlugin()
455
455
}
456
456
457
457
RenderSetupLaterSection ( true , ( ) => {
458
- currentStage = ConfigurationStage . ProjectConfiguration ;
458
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
459
459
Repaint ( ) ;
460
460
} ) ;
461
461
}
@@ -464,7 +464,7 @@ private void RenderEnableMicrosoftOpenXRPlugin()
464
464
{
465
465
if ( XRSettingsUtilities . MicrosoftOpenXREnabled )
466
466
{
467
- currentStage = ConfigurationStage . Init ;
467
+ CurrentStage = ConfigurationStage . Init ;
468
468
Repaint ( ) ;
469
469
}
470
470
EditorGUILayout . LabelField ( "XR Pipeline Setting - Installing the Microsoft OpenXR plugin" , EditorStyles . boldLabel ) ;
@@ -480,7 +480,7 @@ private void RenderEnableMicrosoftOpenXRPlugin()
480
480
Application . OpenURL ( MSOpenXRPluginUrl ) ;
481
481
}
482
482
RenderSetupLaterSection ( true , ( ) => {
483
- currentStage = ConfigurationStage . ProjectConfiguration ;
483
+ CurrentStage = ConfigurationStage . ProjectConfiguration ;
484
484
Repaint ( ) ;
485
485
} ) ;
486
486
}
@@ -512,7 +512,7 @@ private void RenderConfiguredConfirmation()
512
512
CreateSpace ( 10 ) ;
513
513
if ( GUILayout . Button ( "Next" ) )
514
514
{
515
- currentStage = ConfigurationStage . ImportTMP ;
515
+ CurrentStage = ConfigurationStage . ImportTMP ;
516
516
Repaint ( ) ;
517
517
}
518
518
RenderSetupLaterSection ( ) ;
@@ -535,7 +535,7 @@ private void RenderChoiceDialog()
535
535
}
536
536
537
537
RenderSetupLaterSection ( true , ( ) => {
538
- currentStage = ConfigurationStage . ImportTMP ;
538
+ CurrentStage = ConfigurationStage . ImportTMP ;
539
539
Repaint ( ) ;
540
540
} ) ;
541
541
}
@@ -544,7 +544,7 @@ private void RenderImportTMP()
544
544
{
545
545
if ( TMPEssentialsImported ( ) )
546
546
{
547
- currentStage = ConfigurationStage . ShowExamples ;
547
+ CurrentStage = ConfigurationStage . ShowExamples ;
548
548
Repaint ( ) ;
549
549
}
550
550
EditorGUILayout . LabelField ( "Importing TMP Essentials" , EditorStyles . boldLabel ) ;
@@ -555,7 +555,7 @@ private void RenderImportTMP()
555
555
m_ResourceImporter . OnGUI ( ) ;
556
556
CreateSpace ( 15 ) ;
557
557
RenderSetupLaterSection ( true , ( ) => {
558
- currentStage = ConfigurationStage . ShowExamples ;
558
+ CurrentStage = ConfigurationStage . ShowExamples ;
559
559
Repaint ( ) ;
560
560
} ) ;
561
561
}
@@ -564,7 +564,7 @@ private void RenderShowUPMExamples()
564
564
{
565
565
if ( ! MRTKExamplesPackageImportedViaUPM ( ) )
566
566
{
567
- currentStage = ConfigurationStage . Done ;
567
+ CurrentStage = ConfigurationStage . Done ;
568
568
Repaint ( ) ;
569
569
GUIUtility . ExitGUI ( ) ;
570
570
}
@@ -584,7 +584,7 @@ private void RenderShowUPMExamples()
584
584
}
585
585
if ( GUILayout . Button ( "Got it, next" ) )
586
586
{
587
- currentStage = ConfigurationStage . Done ;
587
+ CurrentStage = ConfigurationStage . Done ;
588
588
Repaint ( ) ;
589
589
}
590
590
}
0 commit comments