mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 14:44:17 +00:00
run coroutines also while Editor is paused
This commit is contained in:
parent
862f6c39f1
commit
07208ddceb
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue