Пример #1
0
 static async void Req(string url)
 {
     using (UnityWebRequestAsync webRequestAsync = ETModel.ComponentFactory.Create <UnityWebRequestAsync>())
     {
         await webRequestAsync.DownloadAsync(url);
     }
 }
Пример #2
0
        public static async Task Req(string url, CallBack callback)
        {
            using (UnityWebRequestAsync webRequestAsync = ETModel.ComponentFactory.Create <UnityWebRequestAsync>())
            {
                await webRequestAsync.DownloadAsync(url);

                callback(webRequestAsync.Request.downloadHandler.text);
            }
        }