Addressables GetDownloadSizeAsync and GetDownloadStatus().Percent always returns 0 with PlayFab CDN

Hello everybody!
I’m currently working on a project which uses addressables that are stored at PlayFab CDN. but it’s been a while since cannot retrieve some important information to finish the download process correctly.

  • When I try to get the download size with the GetDownloadSizeAsync method, I always get 0 as a response.
  • With the DownloadDependenciesAsync, although I get the download done, I cannot get the right percentage with the method AsyncOperationHandle.GetDownloadStatus().Percent, it always returns 0.

*Points for consideration:

  • When tested in other environments (Like Google Cloud Storage, for example), these issues do not occur.
  • I’ve already opened a ticket with PlayFab support, but they are still struggling to find the solution to this issue. Actually, although I know that the issue occurs only with PlayFab, I still don’t know if the issue is with them or with Unity at all.
  • As I was making my research, I found another repository that uses Firebase as the standard CDN, but his readme has some interesting information about the GetDownloadSizeAsync that may be of help for this solution: Github repo


I know this is something very specific, but if anyone ever had this issue previously or has any idea on how to solve it, it would be awesome!

Just so I be more clear, I know that GetDownloadSizeAsync will always return 0 if the file is already on cache, so I’ve checked and that’s not the case.

It sounds like PlayFab may have a custom resource provider. It may not be implemented to provide this information.

Do you use the PlayFab providers at : Unity Addressables: PlayFab Integration

In order to determine if the bundle is to download, we check if it begins with “http”. However this plugin puts “playfab://” before the http. So it is not flagged as not a web url. It you have “playfab://” to “http.playfab://” in the code and profile. Then it will be seen as a remote web address and used accordingly.

1 Like

Thank you for the answer, I can see that I’m very close to the solution here. The issue is that I cannot set the start of RemoteLoadPath path to HTTP, as PlayFab throw an error (“RemoteBuildPath must start with playfab://”)

Could you be more specific on what I should do?

I don’t think there is a solution without editing the PlayFab stuff. You could register to Transforming the id to begin with http Transforming resource URLs | Addressables | 1.20.5
But I suspect that will complain in the playfab side. You will need to modify places where the plugin uses “playfab://” and change it.

1 Like