Delay automatically fallback to Realtime when run on EditMode #234
parent
6351d4c5a4
commit
cae512e4de
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue