run coroutines also while Editor is paused

This commit is contained in:
in0finite 2022-02-12 19:51:37 +01:00
parent 862f6c39f1
commit 07208ddceb

View file

@ -19,16 +19,16 @@ namespace SanAndreasUnity.Utilities
static void EditorUpdate()
{
if (!F.IsAppInEditMode)
return;
// note: this will also update coroutines in play mode, and also while the Editor is paused.
// if coroutines wish to avoid that, we need to add a flag for every coroutine
m_coroutineRunner.Update();
}
#endif
void Update()
{
m_coroutineRunner.Update();
if (!Application.isEditor)
m_coroutineRunner.Update();
}
public static CoroutineInfo Start(IEnumerator coroutine)