summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs')
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs39
1 files changed, 0 insertions, 39 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs
deleted file mode 100644
index e1ad8c7..0000000
--- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections;
-using UnityEditor;
-
-namespace UnityEngine.TestTools
-{
- public class EnterPlayMode : IEditModeTestYieldInstruction
- {
- public bool ExpectDomainReload { get; }
- public bool ExpectedPlaymodeState { get; private set; }
-
- public EnterPlayMode(bool expectDomainReload = true)
- {
- ExpectDomainReload = expectDomainReload;
- }
-
- public IEnumerator Perform()
- {
- if (EditorApplication.isPlaying)
- {
- throw new Exception("Editor is already in PlayMode");
- }
- if (EditorUtility.scriptCompilationFailed)
- {
- throw new Exception("Script compilation failed");
- }
- yield return null;
- ExpectedPlaymodeState = true;
-
- EditorApplication.UnlockReloadAssemblies();
- EditorApplication.isPlaying = true;
-
- while (!EditorApplication.isPlaying)
- {
- yield return null;
- }
- }
- }
-}