diff --git a/src/UniTask/Assets/Editor/EditorRunnerChecker.cs b/src/UniTask/Assets/Editor/EditorRunnerChecker.cs index b91524d..d4afbc8 100644 --- a/src/UniTask/Assets/Editor/EditorRunnerChecker.cs +++ b/src/UniTask/Assets/Editor/EditorRunnerChecker.cs @@ -22,7 +22,9 @@ public static class EditorRunnerChecker //var r = await UnityWebRequest.Get("https://bing.com/").SendWebRequest().ToUniTask(); //Debug.Log(r.downloadHandler.text.Substring(0, 100)); - await UniTask.Yield(); + //await UniTask.Yield(); + + await UniTask.DelayFrame(30); Debug.Log("End"); } diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs index fc32d51..5c56747 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs @@ -444,7 +444,19 @@ namespace Cysharp.Threading.Tasks // skip in initial frame. if (initialFrame == Time.frameCount) { +#if UNITY_EDITOR + // force use Realtime. + if (PlayerLoopHelper.IsMainThread && !UnityEditor.EditorApplication.isPlaying) + { + //goto ++currentFrameCount + } + else + { + return true; + } +#else return true; +#endif } }