Skip to content

Commit 3fe7cd1

Browse files
authored
Merge pull request #67 from AIO-GAME/1.x
1.x
2 parents 236272b + b651f67 commit 3fe7cd1

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
[Ll]ogs/
2323
[Bb]in/
2424
[Oo]bj/
25-
[Pp]ackages/
25+
[Pp]ackages/
26+
[Vv]env/

Extensions/YooAsset.CLI/Runtime/1.5.7/Downloader/YAssetProxy.Downloader.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ private void CollectNeedBegin()
326326

327327
private Dictionary<string, long> CurrentValueDict = new Dictionary<string, long>();
328328
private Dictionary<string, long> TotalValueDict = new Dictionary<string, long>();
329-
private Dictionary<string, long> DownloadedFiles = new Dictionary<string, long>();
330329

331330
private long FirstValue = -1;
332331

@@ -335,8 +334,6 @@ private bool OnWaitBegin()
335334
CurrentValueDict.Clear();
336335
TotalValueDict.Clear();
337336

338-
CurrentValueDict[nameof(DownloadedFiles)] = DownloadedFiles.Sum(pair => pair.Value);
339-
340337
foreach (var pair in ResourceDownloaderOperations)
341338
{
342339
TotalValueDict[pair.Key] = pair.Value.TotalDownloadBytes;
@@ -346,6 +343,11 @@ private bool OnWaitBegin()
346343
if (FirstValue < 0)
347344
{
348345
FirstValue = TotalValue = TotalValueDict.Sum(pair => pair.Value);
346+
CurrentValue = CurrentValueDict.Sum(pair => pair.Value);
347+
}
348+
else
349+
{
350+
CurrentValueDict[nameof(FirstValue)] = FirstValue - TotalValueDict.Sum(pair => pair.Value);
349351
}
350352

351353
CurrentValue = CurrentValueDict.Sum(pair => pair.Value);
@@ -505,14 +507,12 @@ protected override IEnumerator OnWaitCo()
505507

506508
private void OnStartDownloadFileCallback(string filename, long sizeBytes)
507509
{
508-
DownloadedFiles[filename] = sizeBytes;
509510
CurrentInfo = $"Resource download : [{filename}:{sizeBytes}]";
510511
AssetSystem.Log($"Resource download : [{filename}:{sizeBytes}]");
511512
}
512513

513514
private void OnDownloadError(string filename, string error)
514515
{
515-
DownloadedFiles.Remove(filename);
516516
var ex = new SystemException($"{filename} : {error}");
517517
if (Event.OnError is null) throw ex;
518518
Event.OnError.Invoke(ex);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.aio.cli.asset",
33
"displayName": "AIO Unity CLI Asset",
44
"description": "unity3d resources management system.",
5-
"version": "1.1.6-preview",
5+
"version": "1.1.7-preview",
66
"unity": "2019.4",
77
"category": "Runtime",
88
"unityRelease": "0f1",

0 commit comments

Comments
 (0)