How to load already downloaded remote catalog without loading remote catalog?

For my game I’m loading a remote catalog from my server and then downloading the dependencies. Everything is working perfectly while the device still has internet and can read the remote catalog, but if I already downloaded the catalog how can I load it again without accessing the remote catalog?

I’m trying to allow my game to be playable with the latest download content when the device can’t connect to the server but I can’t seem to find any example of how to reference the downloaded catalog instead of the remote.

This is handled by Addressables internally. It saves the remote catalog under Application.persistentDataPath. When initializing the Addressables, it will load the cached remote catalog.

That’s not the behavior that I’m getting. That only happens if I can still access the remote catalog so when I call LoadContentCatalogAsync it will load the local one since the hash is the same.

Alright found a way to make this work, I thought that it would be handled by the Addressables, but seems like you need to manually do it. (This is tested and working on Windows build and editor). Note, it is kind of a mess, but it seems to be working fine for now.

I started typing everything here, but it ended up being extremely long. I’ll be making a repository with all the code and tricks for everyone to use. I’ll update this thread once it’s uploaded.

Alright repository is up with both the system and a simple enough example that can be tested from editor or from a build. This so far has fixed all the issues I’ve had with the Addressables. UnityShare / Addressables Remote Catalog · GitLab

This project shows a fully working example of how to:

  • Download remote catalogs

  • Get catalog size and ask player for downloading

  • Handles canceling update and still be able to play with local catalog

  • Handles updating to the new catalog

  • Delete all the cached data

It also has custom logic that in my opinion should be handled by the Addressables system for:

  • Clearing cache data (Addressables implementation is throwing errors)
  • Resetting addressables completely (No available implementation)
  • Caching downloaded remote catalog in a way that prevents auto downloading updates (No available implementation)

It would be amazing if anyone from Unity could take a look since and implement those fixes.

Quick update on the above repo, I’ve added an example of how to load multiple remote catalogs. Implementation is used as if each catalogs were DLCs. I’ve also made my own fork Addressables - Multi-Catalog for building multiple catalogs in a same project: GitHub - RotaryHeart/com.unity.addressables: Addressables extended with the ability to build multiple catalogs, ideal for traditional DLC purposes.

Just found myself in similar situation: addressables don’t work as expected sometimes(i.e. no methods to check whether you previously downloaded the bundle or not; no auto cash clearing and many others), and when things come up to developing offline mode I finally found this thread.

You are the best. Thanks!

I’m glad to know that it have helped you