update resource package

修复下载器合并后重新计算下载字节数不正确的问题。
pull/229/head
hevinci 2023-11-22 11:13:39 +08:00
parent 6dd1f43445
commit d4fcb868d8
1 changed files with 7 additions and 1 deletions

View File

@ -208,12 +208,18 @@ namespace YooAsset
{ {
if (_bundleInfoList != null) if (_bundleInfoList != null)
{ {
TotalDownloadBytes = 0;
TotalDownloadCount = _bundleInfoList.Count; TotalDownloadCount = _bundleInfoList.Count;
foreach (var packageBundle in _bundleInfoList) foreach (var packageBundle in _bundleInfoList)
{ {
TotalDownloadBytes += packageBundle.Bundle.FileSize; TotalDownloadBytes += packageBundle.Bundle.FileSize;
} }
} }
else
{
TotalDownloadBytes = 0;
TotalDownloadCount = 0;
}
} }
/// <summary> /// <summary>