File tree Expand file tree Collapse file tree
Assets/BossRoom/Scripts/Editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ public class SceneBootstrapper
3434 const string k_LoadBootstrapSceneOnPlay = "Boss Room/Load Bootstrap Scene On Play" ;
3535 const string k_DoNotLoadBootstrapSceneOnPlay = "Boss Room/Don't Load Bootstrap Scene On Play" ;
3636
37+ const string k_TestRunnerSceneName = "InitTestScene" ;
38+
3739 static bool s_StoppingAndStarting ;
3840
3941 static string BootstrapScene
@@ -99,6 +101,11 @@ static void DisableDoNotLoadBootstrapSceneOnPlay()
99101
100102 static void EditorApplicationOnplayModeStateChanged ( PlayModeStateChange obj )
101103 {
104+ if ( IsTestRunnerActive ( ) )
105+ {
106+ return ;
107+ }
108+
102109 if ( ! LoadBootstrapScene )
103110 {
104111 return ;
@@ -157,5 +164,10 @@ static void EditorApplicationOnplayModeStateChanged(PlayModeStateChange obj)
157164 }
158165 }
159166 }
167+
168+ static bool IsTestRunnerActive ( )
169+ {
170+ return EditorSceneManager . GetActiveScene ( ) . name . StartsWith ( k_TestRunnerSceneName ) ;
171+ }
160172 }
161173}
You can’t perform that action at this time.
0 commit comments