Update download system
使用新的断点续传下载器
This commit is contained in:
@@ -86,11 +86,8 @@ namespace YooAsset
|
||||
{
|
||||
YooLogger.Log($"Beginning to download file : {bundleInfo.Bundle.FileName} URL : {bundleInfo.RemoteMainURL}");
|
||||
FileUtility.CreateFileDirectory(bundleInfo.Bundle.CachedFilePath);
|
||||
DownloaderBase newDownloader;
|
||||
if (bundleInfo.Bundle.FileSize >= _breakpointResumeFileSize)
|
||||
newDownloader = new HttpDownloader(bundleInfo);
|
||||
else
|
||||
newDownloader = new FileDownloader(bundleInfo);
|
||||
bool breakDownload = bundleInfo.Bundle.FileSize >= _breakpointResumeFileSize;
|
||||
DownloaderBase newDownloader = new FileDownloader(bundleInfo, breakDownload);
|
||||
newDownloader.SendRequest(failedTryAgain, timeout);
|
||||
_downloaderDic.Add(bundleInfo.Bundle.CachedFilePath, newDownloader);
|
||||
return newDownloader;
|
||||
|
||||
Reference in New Issue
Block a user