Unity-TaskManager icon indicating copy to clipboard operation
Unity-TaskManager copied to clipboard

one frame delay?

Open wantnon2 opened this issue 8 years ago • 0 comments

i think IEnumerator CallWrapper() { yield return null; IEnumerator e = coroutine; while(running) { if(paused) yield return null; else { if(e != null && e.MoveNext()) { yield return e.Current; } else { running = false; } } }

        FinishedHandler handler = Finished;
        if (handler != null) {
            handler (stopped);
        }
        yield return null;
    }

should change to IEnumerator CallWrapper() { ///yield return null; IEnumerator e = coroutine; while(running) { if(paused) yield return null; else { if(e != null && e.MoveNext()) { yield return e.Current; } else { running = false; } } }

        FinishedHandler handler = Finished;
        if (handler != null) {
            handler (stopped);
        }
        yield return null;
    }

otherwise the coroutine will be one frame delay to execute, and in some case may cause wrong effect.

wantnon2 avatar Jun 29 '16 15:06 wantnon2