juniordiscart / com.unity.addressables

Addressables extended with the ability to build multiple catalogs, ideal for traditional DLC purposes.
https://docs.unity3d.com/Packages/com.unity.addressables@1.17/manual/index.html
Other
76 stars 23 forks source link

Duplicate address 'AddressablesMainContentCatalogRemoteHash' #9

Open V0odo0 opened 1 year ago

V0odo0 commented 1 year ago

After proper setup and building with Multi-Catalog the console gives the following error on each asset load attempt from remote group in runtime: Duplicate address 'AddressablesMainContentCatalogRemoteHash' with id 'https://here_is_my_domain//catalog_1.hash' found, skipping...

I haven't found anything related to this error on web. Any clues?

juniordiscart commented 1 year ago

Remote groups, or remote loading is (currently) not supported. This package assumes all content is stationed locally for loading.

Reason for this being absent is that I have yet to use it myself (so I have no clue what's going on under the hood), and It's quite involved in terms of keeping track of updates in the internal state object.

If you have a simple reproduction case, I can have a look at it to fix this issue specifically. But otherwise, I think your best bet it to fork this repo and add it yourself for working with remote content.

V0odo0 commented 1 year ago

If you have a simple reproduction case, I can have a look at it to fix this issue specifically. But otherwise, I think your best bet it to fork this repo and add it yourself for working with remote content.

To reproduce: The main catalog should be loaded from remote server. Check for catalog updates on startup.

Three groups:

  1. Local (built-in). Placed under streaming assets folder
  2. Local (with multi-catalog setup). Placed under mods folder. Might have objects with references to Local (built-in)
  3. Remote. Some of the objects has references to Local (with multi-catalog setup).

I've got this error without even trying to load Local (with multi-catalog setup) catalog.

dnnkeeper commented 11 months ago

Yeah, I encountered this issue too. The option to build a remote catalog is probably ignored so a local catalog is always loaded. That is why an attempt to load a remote one creates a conflict. Disabling 'Build Remote Catalog' eliminates this error but one can't load a remote catalog without an app rebuild.

tangxianbo commented 7 months ago

Are there any ideas to solve this problem? I want to try it, but I am not familiar with this library.

dnnkeeper commented 7 months ago

@tangxianbo I guess the only way to mitigate this error is to avoid dependencies from Remote to External groups.

I managed to make a remote catalog setup like this:

So until external groups have no assets that remote group depends on you should be fine

tangxianbo commented 7 months ago

@dnnkeeper Thanks for your reply, I understand. I will take some time to get familiar with this library and see if it can be more flexible