I feel like I’m very close to getting my desired remote content setup working, but it’s probably better to simply describe the plan rather than my specific trouble spot first.
What I’d like to achieve:
I know it’s possible to have a ‘main’ project add remote Addressable catalogs from multiple ‘content projects’ by using LoadContentCatalogAsync; I want to do this by hosting the bundles from each content project on CCD. I’ve never done it before but it’s supposedly been possible for years now. The plan is to have a minimal main project use Remote Config at startup to fetch a list of remote catalog URLs for LoadContentCatalogAsync to fetch. However, for simplicity sake, I’m just using one debug URL at the moment.
I’ve got a separate content project with the sole job of building out an Addressable scene asset, complete with dummy cube. Remote catalog building is enabled and I’ve set the RemoteLoadPath for this project to point to a CCD bucket release (not sure if this is necessary…). That builds out as cube_all.bundle nicely, so I upload the bundle and catalog and hash to the CCD bucket.
Ideally, this ‘main’ project would be able to pull remote scenes like this from potentially many different CCD buckets without any knowledge of each other. This is possible, right?
The problem I’m having in my attempt:
Now for my specific issue, I fetch the remote catalog using LoadContentCatalogAsync and that works great. I can query Addressables for ResourceLocations at that point and it does find this Cube.unity scene. If I ask it what the download size is with GetDownloadSizeAsync, it correctly answers the byte amount, looking good. But when I go to actually download using DownloadDependenciesAsync, I get the following:
UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=Assets/Scenes/Cube.unity, Type=System.Object
If I go to actually load via LoadSceneAsync, I get a whole bunch of errors:
Unable to open archive file: Library/com.unity.addressables/aa/OSX/StandaloneOSX/af0ec3231eaf1c31deb12038dda80b64_unitybuiltinshaders_3dd91f4109fbd8368fc8155e49d57676.bundle
Failed to read data for the AssetBundle 'af0ec3231eaf1c31deb12038dda80b64_unitybuiltinshaders_3dd91f4109fbd8368fc8155e49d57676.bundle'.
RemoteProviderException : Invalid path in AssetBundleProvider: 'Library/com.unity.addressables/aa/OSX/StandaloneOSX/af0ec3231eaf1c31deb12038dda80b64_unitybuiltinshaders_3dd91f4109fbd8368fc8155e49d57676.bundle'.
Both the main project and content project are using Unity 2022.1.23f1, Addressables 1.20.5, CCDM 2.1.0.
Any idea how close I am to achieving the setup? It feels very close so it’s correctly ingesting the remote catalog and can poll the scene bundle sizes… it just seems to be tripping over the bundle containing Unity’s default shaders, but that doesn’t appear in the bundle build location (it appears elsewhere) and uploading it anyway makes no difference.