Hi, I’m developing a WebGL game and trying to make the initial build as small as possible. For this purpose, I’m using Addressables. My plan is to include only the preloader and lobby scenes in the initial build and store other scenes as bundles on the CDN. I found this guide that seems to cover what I need, so I tried to replicate it.
Right now, I have the following build routine:
- Build the WebGL build along with the Built-In Addressable group.
- Build only the remote groups and deploy the
catalog.json
,catalog.hash
, and.bundle
files on the CDN.
Then, when the game launches, I’m loading the remote catalog using Addressables.LoadContentCatalogAsync("cdnPath.com/catalog.json")
. Everything works fine until I try to load one of the scenes that are located in the remote catalog.
It fails with the error that Addressables can’t find a56698118c820ec8795d7ac586e12f1e_unitybuiltinassets_196ec6bc53c9c1c397129472e0e5bb72.bundle
and a56698118c820ec8795d7ac586e12f1e_monoscripts_bfb8c828116a447eda43cc40033ded18.bundle
in the StreamingAssets/aa/WebGl
folder.
I’ve discovered that these bundles appeared starting from Addressables v2 and are referenced by the remote catalog. They are built together with the remote groups, but they are not copied into the remote groups folder. Instead, they are located inside Library\com.unity.addressables\aa\WebGL\WebGL
.
So my question is, how should these bundles appear in the StreamingAssets/aa/WebGl
folder of the game build? The guide clearly states that you can use Addressables.LoadContentCatalogAsync()
to download remote catalogs from other projects. But if those catalogs are built in other projects, it means that those dependency bundles (monoscripts_bfb8c828116a447eda43cc40033ded18.bundle
, unitybuiltinassets_196ec6bc53c9c1c397129472e0e5bb72.bundle
) can’t appear in the StreamingAssets/aa/WebGl
folder of my project and therefore wouldn’t work properly. Is this some a bug, or am I missing something?