feat(DownloadSystem):支持自定义下载请求

This commit is contained in:
huanggongming
2023-02-24 12:18:18 +08:00
parent 0232e5adec
commit eb16ba8365
7 changed files with 54 additions and 5 deletions
@@ -39,7 +39,7 @@ namespace YooAsset
_latestDownloadBytes = 0;
_latestDownloadRealtime = Time.realtimeSinceStartup;
_webRequest = new UnityWebRequest(URL, UnityWebRequest.kHttpVerbGET);
_webRequest = DownloadRequestUtil.NewRequest(URL);
DownloadHandlerFile handler = new DownloadHandlerFile(savePath);
handler.removeFileOnAbort = true;
_webRequest.downloadHandler = handler;