[1.17.5] Getting downloaded percentage seems not working ?

Hi, I am using Unity 2019.2 and previously using Addressables 1.16.15.
I decide to update to 1.17.5 because of the cache clear behavior option and it is great.

I am using the same code on 1.16.15 and 1.17.5 :

downloadHandle = Addressables.DownloadDependenciesAsync(everyKey);
while (!downloadHandle.IsDone)
{
    DownloadStatus status = downloadHandle.GetDownloadStatus();
    OnDownloading?.Invoke(status.Percent, status.TotalBytes);
    yield return null;
}

1.16.15 works fine but 1.17.5. not.

In 1.17.5, the DownloadedBytes in status was 0, result in the percent is also 0.
I have tried downloadHandle.PercentComplete, and it is also returning 0.
But all the bundles can be downloaded and loaded.

Sorry for poor English, and Thanks for the help.

Push.

Besides that, I found out that setting the retry count in addressable group seems not working on mobile device, but editor works fine.

Try using “status.DownloadedBytes”
this works for me.
But I am using Unity 2020.2.

I recognized that “status.TotalBytes” is the size of the current bundle that is downloaded. So if “everyKey” refers to multiple bundles to download, that value will change during the download.

Thanks for the reply.
Both status.DownloadedBytes / status.Percent / downloadHandle.PercentComplete are returning 0 to me.
It is weird because these line of codes work fine at Addressable v1.16.15, so it may be a bug from Addressable.

status.TotalBytes is fine, it is always the total size of bundles from keys, nothing changed.

Same here 2020.1.17f + 1.17.6. status.DownloadedBytes / status.Percent / downloadHandle.PercentComplete are returning 0

The same behaviour. Unity: 2020.1.17f, addressables: 1.17.4/1.17.6. On the 1.16.x everything is displayed correctly.

I’ll flag this for the team to have a look!

1 Like

Hey everyone.

We identified some faulty logic and areas of improvement in the computation of download percentage and progress. We have a fix incoming soon.

1 Like

After testing with latest version (1.17.13), I guess the problem is still existed. Here is my log after added this line of code in my while() loop at #1 :

downloadHandle is a AsyncOperationHandle
status is from downloadHandle.GetDownloadStatus()

Debug.LogError(status.Percent * status.TotalBytes + " / " + status.TotalBytes + "\t(PercentComplete) " + downloadHandle.PercentComplete);

6968396--821321--logerror.png

In this scenario, I have 3 bundles to download, and it seems that those download status values will only changed after completing a download operation of each bundle.

Hmm this is supposed to be fixed. We’ll investigate and update the thread as soon as possible.

Oh. I was right about it being fixed, but wrong about the fix being included in Addressables 1.17.13.

We actually missed some use-cases in our first attempt at fixing this. It should work correctly in version 1.17.15+. I just tested your exact use case and all numbers seem correct.

Apologies for the inconveniences, if any.

As always, don’t hesitate if there’s anything else.

2 Likes