[EN]
Please tell me the final specification of Addressables.GetDownloadSize.
When Addressables.GetDownloadSize () is executed with Addressable [v0.6.7],
The AssetBundle cache is not considered, but
Will it be possible to obtain the size excluding the downloaded AssetBundle cache in the next version (v1.0.*)?
It should be considered. if it is not, this is a bug.
It should be reporting the size calculated during build time. So if you are doing a post-build compression, this won’t currently be reflected. If you are not (and are just letting addressables do the compression), then this too is a bug.
I can confirm that GetDownloadSize() does not consider any prior downloads. It always returns the original download size, but actually loading the addressable asset takes it from the cache immediately.
I feel a bit dumb on not understanding this, so sorry for asking, but how do I use it. I thought that the result from this operation was a long which would be the Download Size, however, it always says 0.
My code snippet is:
Did you start your game in the editor? It returns 0 if you started in fast mode. Try to change the Play Mode Script in the Addressables window to Packed Play Mode.
Are some of your groups set to build to an external folder, that you then manually load onto a server somewhere? If all your content is in your APK, there is nothing to download.
@unity_bill all of the content is build to an external folder and then manually loaded onto a remote server. Shouldn´t there be then a downloadsize in that case?
Only one more question. After getting the 0 download size, if you try to load things, they do work, right? Just making sure it’s not having an issue connecting to the server.
Assuming that’s right, then yes there should be a value greater than 0. We have changed some things surrounding this method in the upcoming release (0.7.x). Once that is out, please test this again. If it is still a problem, please file a ticket against Unity and mention the case number here. Attaching a sample project to that will really help us get to the bottom of things.
Jup, it´s all working, also tested it on couple of Android Phones, downloads everything correctly, just displays 0 downloadsize every time.
Thanks for the help and will do
Apologies in advance if what I say here is obvious to you, but… how and when are you checking the value of Downloadsize? The Completed callback will not execute immediately, so e.g. when putting a Debug.Log in the very next line, Downloadsize will still be 0.