addressables bundles location update in runtime

Hi,

We build an application where we have multiple customers using it with their own assets.
Sort of like a CMS. The UI and the functions are the same for all customers, only they can work with their own models.

Now I got this working with assetbundles like this:
I got an inputfield which can be filled in by the customer. This is the path of where the customer put the assetsbundles they got from us. (all standalone windows btw)
Then it will load the assets of that customer.

I have been searching all day for how to do this with the addressable system, but I could not find it.
I found you can do this with a server, but not all of our customers want to have their models in the cloud for security reasons.
Hopefully someone can point me in the right direction, if this is possible.

Thanks!

Catalogs is what you should to look into. This is where all the instructions and data for asset bundles are stored, including the path to the asset bundles.

You use the following and path can be “C:\xyz\abc_Catalog.json”. This is the path to your catalog (.json) file. Once loaded you can load/instantiate as usual.

 var handle = Addressables.LoadContentCatalogAsync(path, true);
                handle.Completed += OnCatalogLoaded;

https://docs.unity3d.com/Packages/com.unity.addressables@1.8/manual/AddressableAssetsGettingStarted.html#loading-content-catalogs

I will look into that, thanks!

Can the ‘LocalBuildPath’ and the ‘LocalLoadPath’ be different from that path, and copied to that path after the build?
I thought the build- / loadpaths are in that catalog file, or does the catalog just looks inside the folders at his location?

I haven’t tried to move but as far as I can tell (open the catalog.json file and you will see) it path is hard coded. So what you can do is maybe something like “C:\Myapp\Content”. Also you should be able to use something %appdata%/myApp/content/. This is for windows, I have no clue how the IOS files structure work. Just play with it and test it out figure out if you would have any read/write issues etc…

Yes, they can be different paths. When you build what matters is the build path, it is just for building, that’s it. Load path is where you would load from but yes you can set to a different path from build path. That being said, for the sake of simplicity, I would set them both to the same location, a location outside of the project.

Ok clear.
Thank you! I will do some tests with this :slight_smile: