@@ -16,11 +16,14 @@ public class EnforceEditorSettings
1616 {
1717 private const string SessionKey = "_MixedRealityToolkit_Editor_ShownSettingsPrompts" ;
1818 private const string BuildTargetGroupKey = "_MixedRealityToolkit_Editor_Settings_CurrentBuildTargetGroup" ;
19+ private const string HasCheckedXRSupportKey = "_MixedRealityToolkit_Editor_Settings_HasCheckedXRSupport" ;
1920
2021 private static BuildTargetGroup currentBuildTargetGroup = BuildTargetGroup . Unknown ;
2122
2223 private static string mixedRealityToolkit_RelativeFolderPath = string . Empty ;
2324
25+ private static bool hasCheckedVREnabled = false ;
26+
2427 public static string MixedRealityToolkit_RelativeFolderPath
2528 {
2629 get
@@ -193,12 +196,24 @@ private static bool IsNewSession
193196 if ( currentBuildTargetGroup == BuildTargetGroup . Unknown )
194197 {
195198 currentBuildTargetGroup = ( BuildTargetGroup ) SessionState . GetInt ( BuildTargetGroupKey , ( int ) EditorUserBuildSettings . selectedBuildTargetGroup ) ;
199+ SessionState . SetBool ( HasCheckedXRSupportKey , false ) ;
196200 }
197201
198- if ( ! SessionState . GetBool ( SessionKey , false ) || currentBuildTargetGroup != EditorUserBuildSettings . selectedBuildTargetGroup )
202+ if ( currentBuildTargetGroup != EditorUserBuildSettings . selectedBuildTargetGroup )
199203 {
200204 currentBuildTargetGroup = EditorUserBuildSettings . selectedBuildTargetGroup ;
201205 SessionState . SetInt ( BuildTargetGroupKey , ( int ) EditorUserBuildSettings . selectedBuildTargetGroup ) ;
206+ return true ;
207+ }
208+
209+ if ( ! SessionState . GetBool ( HasCheckedXRSupportKey , false ) )
210+ {
211+ SessionState . SetBool ( HasCheckedXRSupportKey , true ) ;
212+ return true ;
213+ }
214+
215+ if ( ! SessionState . GetBool ( SessionKey , false ) )
216+ {
202217 SessionState . SetBool ( SessionKey , true ) ;
203218 return true ;
204219 }
0 commit comments