Sarim Khan
Sarim Khan

Reputation: 1

I want to dynamically load bundles from multiple URLs in Unity addressables

I am using Unity Addressables v1.21.18 and have organized my assets into multiple groups, uploading them to an S3 bucket. I have three environments: dev, stage, and prod, each with its own configured bucket. In my game, I have a switcher that changes environments, and I need Addressables to dynamically load from the correct bucket based on the selected environment.

I attempted to manually initialize Addressables, but according to the documentation, Addressables automatically initialize themselves. For the remoteLoadPath, I’ve set it up like this: {Assets.Scripts.AddressablesManager.AssetsURL}/[BuildTarget], where AssetsURL is a static variable that updates when switching environments.

Is there a way to forcefully initialize the addressables again after first time.

Could someone help me figure out how to achieve this dynamic loading?

Thanks in advance!

Upvotes: -1

Views: 107

Answers (1)

Morion
Morion

Reputation: 10860

I think your only option in this case is to manage catalogs yourself. Although it was introduced as an option to download asset bundles created in another project, it allows the loading of concrete catalogs in runtime.

More info can be found here

Upvotes: 0

Related Questions