Shader Bundle Stays on Remote Server Until All Bundles are Downloaded

I just started implementing Addressables.

I managed to hook it up with a simple PHP + MySQL system, with user login, item database and purchase log.

Now I’m trying to implement a system for checking cached bundles and I encountered a behavior I don’t fully understand.

Before any of the items are purchased, all bundles display correct size in bytes. But once I purchase some of them and download them, the purchased ones show 40kB of (remaining) download size. Now when I purchase all of them, they all show zero.

I tracked down the 40kB number to correspond with the size of the one extra bundle generated when building Addressables, that contains Unity Builtin Shaders. I assume it’s the shader used on the materials used by the other Addressables.

What I don’t understand is why it’s built in the first place. It’s not part of any group, it’s built automatically. And second, why it adds 40kB of download size for bundles that were already downloaded and are cached.

Because of this, I cannot rely on the download size to be zero as a give away of the bundle being cached, as this is only the case when all bundles are already cached.

Hi MDTxxx, you can find some documentation around the unitybuiltinshaders bundle here.

As mentioned there, this AssetBundle gets created if any of your Addressable Assets have a dependency on a shader that’s built-in with the Editor (e.g. the Standard Shader). These are built into an AssetBundle rather than into the built Player data due to how dependencies are calculated during the build process.

However, that doesn’t explain why you’re still observing the 40kB download size for AssetBundles that have already been downloaded and cached. That’s unexpected and could be a bug, though it’s difficult to say without knowing the full details of your implementation. I would recommend submitting a bug report if you’re unable to resolve the issue.