diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs index fd13bd2..3105d9f 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs @@ -106,6 +106,14 @@ namespace Cysharp.Threading.Tasks throw new ArgumentOutOfRangeException("Delay does not allow minus delayTimeSpan. delayTimeSpan:" + delayTimeSpan); } +#if UNITY_EDITOR + // force use Realtime. + if (!UnityEditor.EditorApplication.isPlaying) + { + delayType = DelayType.Realtime; + } +#endif + switch (delayType) { case DelayType.UnscaledDeltaTime: