Unity3dAsyncAwaitUtil icon indicating copy to clipboard operation
Unity3dAsyncAwaitUtil copied to clipboard

Added GetAwaiter extension for UnityEngine.Coroutine objects

Open Brice-xCIT opened this issue 6 years ago • 2 comments

This PR enables awaiting on a coroutine object that has been created previously.

Example:

// start a coroutine
Coroutine coroutine = StartCoroutine(MyCoroutine());

// do things while the coroutine is running.
// ...

// now waits for the coroutine to complete.
await coroutine;

Brice-xCIT avatar Feb 27 '19 15:02 Brice-xCIT

@svermeulen what do you think?

Ujang360 avatar Apr 01 '19 01:04 Ujang360

good!

chiuan avatar Sep 17 '19 10:09 chiuan