Пример #1
0
        public static CoroutineAsyncBridge Start <T>(T awaitTarget)
        {
            var bridge = new CoroutineAsyncBridge();

            MainThreadDispatcher.StartCoroutine(bridge.Run(awaitTarget));
            return(bridge);
        }
Пример #2
0
 public static CoroutineAsyncBridge GetAwaiter(this Coroutine coroutine)
 {
     return CoroutineAsyncBridge.Start(coroutine);
 }
Пример #3
0
 public static CoroutineAsyncBridge GetAwaiter(this IEnumerator coroutine)
 {
     return CoroutineAsyncBridge.Start(coroutine);
 }
Пример #4
0
#pragma warning restore CS0618
#endif



        public static CoroutineAsyncBridge<AsyncOperation> GetAwaiter(this AsyncOperation asyncOperation)
        {
            return CoroutineAsyncBridge<AsyncOperation>.Start(asyncOperation);
        }
Пример #5
0
        // should use UniRx.Async in C# 7.0

#if UNITY_2018_3_OR_NEWER
#pragma warning disable CS0618
#endif
        public static CoroutineAsyncBridge<WWW> GetAwaiter(this WWW www)
        {
            return CoroutineAsyncBridge<WWW>.Start(www);
        }
 public static CoroutineAsyncBridge <UnityWebRequest> GetAwaiter(this UnityWebRequest www)
 {
     return(CoroutineAsyncBridge <UnityWebRequest> .Start(www));
 }