Please free to use.
Sample in /Assets/Scripts/Coroutine/Sample
IEnumator Foo() {
yield return null;
}
CoroutineExecutor.Do(Foo());
var group = new GroupCoroutine(Foo());
group.Add(Foo());
CoroutineExecutor.Do(group);
var order = new OrderCoroutine(Foo1());
order.Add(Foo2());
CoroutineExecutor.Do(order);
// It will wait until receiving event
var ev = new EventCoroutine(new string[] {"ABC", "123"});
yield return ev;
// After some coroutine wait for event, You can send event by this way to trigger EventCoroutine to finish.
CoroutineExeCcutor.SendEvent("ABC");
// Then every EventCoroutine wait for "ABC" event will be finished.
yield return BaseCoroutine.WaitFor.FixedUpdate;
or yield return new WaitForFixedUpdate();
yield return BaseCoroutine.WaitFor.EndOfFrame;
or yield return new WaitForEndOfFrame();
var co = CoroutineExecutor.Do(Foo());
// Pause
co.Pause = true;
// Resume
co.Pause = false;
var co = CoroutineExecutor.Do(Foo());
co.Cancel();
Support Playmaker