Delay automatically fallback to Realtime when run on EditMode #234

master
neuecc 2021-02-25 19:25:48 +09:00
parent 6351d4c5a4
commit cae512e4de
1 changed files with 8 additions and 0 deletions

View File

@ -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: