public static CoroutineWrapper StartCancelableCoroutineAsync(IEnumerator coroutine, MonoBehaviour host, CancellationToken cancellationToken) { var wrapper = new CoroutineWrapper(cancellationToken); RunOnUnityScheduler(() => { host.StartCoroutine(wrapper.Run(coroutine)); }); return(wrapper); }
public static CoroutineWrapper StartCoroutineAsync(IEnumerator coroutine, MonoBehaviour host) { var wrapper = new CoroutineWrapper(); RunOnUnityScheduler(() => { host.StartCoroutine(wrapper.Run(coroutine)); }); return(wrapper); }