예제 #1
0
        public static CoroutineWrapper StartCancelableCoroutineAsync(IEnumerator coroutine, MonoBehaviour host, CancellationToken cancellationToken)
        {
            var wrapper = new CoroutineWrapper(cancellationToken);

            RunOnUnityScheduler(() => { host.StartCoroutine(wrapper.Run(coroutine)); });
            return(wrapper);
        }
예제 #2
0
        public static CoroutineWrapper StartCoroutineAsync(IEnumerator coroutine, MonoBehaviour host)
        {
            var wrapper = new CoroutineWrapper();

            RunOnUnityScheduler(() => { host.StartCoroutine(wrapper.Run(coroutine)); });
            return(wrapper);
        }