How to handle "core" and "content" addressable catalogs when content bundle rely on core assets

Hi there, I have been trying to find a solution to this for while, with no luck.

I have 3 projects, one builds the player, another has all “core content”, and the third one has “app content” that builds on top of core assets. I would like to be able to update core content and app content separately. The reason for this is to be able to create more projects in the future with different “app content”, but reusing the same core one, so that the main app can always load the core content and then decide which app content to load at runtime. In this way, if we update the core content, it does not matter what app content we load, it will always use updated core assets.

This is what I have so far:

  • Main project with minimum content. It builds the player. The app, once initialized, downloads several catalogs from different sources, given by our server. Then it uses them to first load “core scenes”, and second “app content scenes”.

  • Building addressable for groups with core assets is simple enough, as they do not have any reference to anything but themselves. So, I go to core content project, build addressables, and upload bundles and catalogs to the server.

  • Building app content assets is what it is giving me all the problems. These assets rely on other assets that are part of core addressable bundles. Ideally, I would just disable core bundles and build addressables only for app content groups, get their catalog and upload it. However this takes anything that is referenced from a core bundle and duplicates it into app content ones, so not an option. If, on the other hand, we include core bundles in the build, these override the one in the core content project.

I have found some users talking about creating multiple catalogs (Building multiple catalogs) which could partially work for me, as I could just use the catalog created for app content groups and disregard anything else. But this approach means modifying the addressables package which is not ideal, and reading their comments it also seems to have several limitations concerning updates and remote addressables.

I also tried modifying the resulting catalog to remove the entries that I do not want (groups related to core content), but simply removing them breaks the catalog, I am assuming that due to the fields that I cannot do anything with (m_KeyDataString, m_EntryDataString, etc).

So my question is, is there a way of achieving what I want to do?

1 Like

For anyone interested, I was approaching this the wrong way. No need to mess with catalogs, I just needed to resolve asset references at runtime in a way that both core and additional app catalogs point to the same core bundles. This is achieved thanks to Addressables.InternalIdTransformFunc, which is callback that is triggered just before an asset is loaded.

In this way, if core project has core bundles with a load path of CoreAssetPath/MyCoreAsset, and the project with the additional content does the same for those bundles, we can build addressables as usual and, at runtime, we just need to replace “CoreAssetPath” with the real path (a url in my case), using InternalIdTransformFunc.