(Case 1343073) Addressables doesn't ignore excluded files/folders (. prefix or ~ suffix)

Unity allows to exclude files and folders from the “Assets” directory by prefixing them with the . or suffixing them with the ~ symbol. It’s explained in the documentation under “Hidden assets”: Unity - Manual: Special folder names

Addressables.GetDownloadSizeAsync, perhaps other Addressables APIs too, does not ignore these excluded files and causes the method call then fail.

Reproduce

  • Open project on Windows
  • Click in the Addressables Groups window “Play Mode Script > Use Asset Database”
  • Press Play
  • Press “Check for new Content”

Actual
System.Exception: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Assets/Textures/.keepme, Type=System.Object

Expected
No error due to excluded files and folders.

7236884–871298–bugreport_1343073.zip (159 KB)

QA was able to reproduce the issue, thanks!