static async void Req(string url) { using (UnityWebRequestAsync webRequestAsync = ETModel.ComponentFactory.Create <UnityWebRequestAsync>()) { await webRequestAsync.DownloadAsync(url); } }
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); } }