After losing yet another 12+ hours failing to troubleshoot Addressables issues, I’m humbly begging for help from the community and the Addressables Team. I am using Addressables 1.19.19, and Unity 2021.3.21f. I use “Use Existing Build” Play Mode option, always.
My issue: Updating local assets and rebuilding bundles creates new bundles (great!), and those bundles are saved to a local Apache WWW directory on my machine (also great!), however Addressables continues to refer to the old bundles without getting the new ones (ugh). If you delete the old bundles and leave the new ones you get RemoteProviderExceptions because Addressables continues to look for the old bundles, and won’t get the new ones (double ugh).
I have have several “CORE” bundles that are included with the binary that goes to the store, and these are always saved with the Player. They are saved in /ProjectName/Library/com.unity.addressables and Addressables is supposed to automatically move these into the Unity project at build time. I have many more “DLC” bundles that are saved to a local Apache WWW folder on my machine (used during Dev/Test), and later moved to a Cloud storage bucket (for Prod). The problem of Addressables failing to find newly changed bundles is happening to BOTH types of bundles, whether they are included with the app/player or they are saved/loaded remotely.
Note that I am using Player Version Override to always keep the same catalog name. The idea being that if a remote/Cloud catalog of the same name is updated, the player will download that and become aware of any bundles that have been modified since the app was published to store. This may be important later?
Simplest test case:
-
Have some CORE files that are bundled and always included in binary that goes to store, never changes remotely
-
Build Addressables: COREBUNDLE1 is built, CATALOG1 is built - works! CATALOG1 knows about COREBUNDLE1
-
Change some CORE files
-
Rebuild Addressables: COREBUNDLE2 is built, COREBUNDLE1 is deleted, CATALOG1 is rebuilt - fail! CATALOG1 is still looking for COREBUNDLE1!
Things I have tried without success:
-
Deleting all the bundles (old and new) and rebuilding them. New bundles are created but Addressables then throws errors saying it can’t find the old bundle names.
-
Deleting the TEMP folder in Unity. No change.
-
Deleting the local user cache (users/AppData/LocalLow/Unity/CompanyNameAppName/ and users/AppData/LocalLow/CompanyName/AppName/com.unity.addressables). This causes the user to be re-prompted to download the bundles but then you get errors stating that Addressables can’t find the old bundles (even if new ones exist!).
-
Using the Addressables menu in the Editor to Clean Build → All, and Clean Build → Build Pipeline. No fix. Addressables still tries to load the old bundles even if they are deleted and there are new ones to download.
-
Deleting the the /UnityProject/Library/com.unity.addressables/ and then rebuilding bundles. This can get things moving again sometimes, especially with CORE bundles. It does not work with DLC bundles (the ones remotely saved/loaded).
-
Changing the “Player Version Override” value to something new and rebuilding all bundles. This gets me past the issue, however this means I will need to re-publish everything to the store again and defeats the purpose of Addressables. If I then change the value of the catalog name back to the previous name it will start failing again.
The problem?: From my understanding and hours I’ve spent learning how Addressables is supposed to work, this may be a catalog issue? For some reason the client seems to be sticking with an old catalog and is not getting a new catalog, or perhaps the new catalog isn’t being created? This is where I need some help. I can see that the catalog file is being re-written on disk when I rebuild everything, yet whatever catalog is being loaded in-game still refers to the old bundles.
Questions:
-
Is there a way to debug out what catalog Addressables is using?
-
Is there a way to verify what bundles the loaded catalog is aware of?
-
Shouldn’t rebuilding with “Player Version Override” on and without changing the catalog name rebuild the catalog into the same location, but refer to the new bundles? Why is this rebuilt catalog refering to old/deleted bundles instead of the new ones?
-
Do you see anything I’m doing wrong here? I’m pulling my hair out here. So close to forking my code and just stripping all Addressables out
Attached screenshots of my Addressables settings:
My 3 sets of paths. Core_Store is always included in binary. DLC_Localhost is for Dev/Test. DLC_Cloud is for Prod.
Addressables settings.
CORE bundle settings that are always included with binary and never change remotely.
DLC bundle that is updated remotely.