update asset system

This commit is contained in:
hevinci
2022-12-05 16:29:45 +08:00
parent ac88fd5cf6
commit 824d1c1501
12 changed files with 48 additions and 142 deletions
@@ -40,12 +40,13 @@ namespace YooAsset
/// </summary>
public override DownloadReport GetDownloadReport()
{
DownloadReport result = OwnerBundle.GetDownloadReport();
foreach (var bundleLoader in DependBundleGroup.DependBundles)
DownloadReport result = new DownloadReport();
result.TotalSize = (ulong)OwnerBundle.MainBundleInfo.Bundle.FileSize;
result.DownloadedBytes = OwnerBundle.DownloadedBytes;
foreach (var dependBundle in DependBundleGroup.DependBundles)
{
var report = bundleLoader.GetDownloadReport();
result.TotalSize += report.TotalSize;
result.DownloadedBytes += report.DownloadedBytes;
result.TotalSize += (ulong)dependBundle.MainBundleInfo.Bundle.FileSize;
result.DownloadedBytes += dependBundle.DownloadedBytes;
}
result.Progress = result.DownloadedBytes / result.TotalSize;
return result;