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 ExitPlayModeTask : TestTaskBase 8 { 9 public ExitPlayModeTask() 10 { 11 RunOnCancel = true; 12 RunOnError = ErrorRunMode.RunAlways; 13 } 14 15 public Func<bool> IsInPlayMode = () => Application.isPlaying; 16 public Action ExitPlayMode = () => EditorApplication.isPlaying = false; 17 18 public override IEnumerator Execute(TestJobData testJobData) 19 { 20 if (!IsInPlayMode()) 21 { 22 yield break; 23 } 24 25 ExitPlayMode(); 26 27 while (IsInPlayMode()) 28 { 29 yield return null; 30 } 31 } 32 } 33}