A game about forced loneliness, made by TACStudios
1using System; 2using System.Collections; 3using UnityEngine; 4 5namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks 6{ 7 internal class EnterPlayModeTask : TestTaskBase 8 { 9 public Func<bool> IsInPlayMode = () => Application.isPlaying; 10 public Action EnterPlayMode = () => EditorApplication.isPlaying = true; 11 12 public override IEnumerator Execute(TestJobData testJobData) 13 { 14 if (IsInPlayMode()) 15 { 16 yield break; 17 } 18 19 // Give the UI a change to update the progress bar, sa entering playmode freezes. 20 yield return null; 21 22 EnterPlayMode(); 23 24 while (!IsInPlayMode()) 25 { 26 yield return null; 27 } 28 } 29 } 30}