Addressables bundles are recreated (with another filename) for no reasons.

Hi,
I’m using addressables in my almost ready to release mobile game to access some levelpack data that is stored online.
This is to prevent a big binary size of the app.
I plan to update my game (binary) each time a new level pack is added, and i also plan to add the associated new levelpack data on my web site (just before the release of the new app version).
A levelpack is more or less defined as one addressable group containing level related asset bundles.

The problem I have is that sometimes, the bundles of some previous older levelpacks are updated (a new bundle with a different hash name is generated).
This happens despite the fact there was no changes at all in them or their dependencies.

It is very annoying, because it will end up with a lot of unnecessary duplicated bundles on my web site, taking a lot of disk space.
(I cannot remove the old bundles because they are still used by the older versions of my app)

I believe it is a bug, but no matter what I try, I cannot find a workaround to fix that.

I did try several option, but all of them have the same problem.
My current options are :

  • remote build catalog disabled (I don’t think I need that feature anyway)
  • bundle mode pack separately (to download each level one at a time, without having to download all the big level pack content)
  • update restriction : cannot Change Post release (I’m not sure about this one, but the 2 options have the same problem anyway)

Once I add a new bundle, I do “New Build->Default build Script” to create the new bundles (and that sometimes incorreclty also create new versions of older bundles)

In attachment, here are 2 versions of an unnecessary updated bundle (with compression and hash in file name disabled).
There are changes in those files.
This might help identifying the problem.

I noticed that the simple action of closing unity, opening it again, and regenerating the bundles could lead to this problem.
Also it seems that performing “Clean Build->All” will duplicates some bundles on next generation, but this is not always the case.

I’m using Addressables 1.6.2, and unity 2019.3.4f1
Is there anything I can do ?

5573155–575191–new.controller.bundle.txt (20.4 KB)
5573155–575194–old.controller.bundle.txt (20.4 KB)

I cannot say for certain if it’s the same issue you’re running into but we have recently fixed some engine side determinism issues. One of which is in the process of being backported to 2019.3 but hasn’t quite made it in yet.

If you have a project that reproduces the issues easily please file a bug with Unity and attach the project so we can check if our engine changes fix the problem or if there’s another determinism issue we need to chase down.

Thank you.
I’ll try to create one, but it is hard because the problem is not 100% reproducible.

For information, i might have a workaround, but I’m not sure yet.

First, I have enabled “build remote catalog” (with the option “update on startup” disabled, beacuase i don’t want a download at every stat of the app).
This allows me to “update a previous build” and not create a new one each time.
This seems to be a little less prone to duplication (but it still have the problem).

In case a duplication problem occurs when I “update a previous build”, I replace the updated addressables_content_state.bin by the previous one (which was stored in git), I remove all the updated ServerData folder content, and I close Unity.
Then I start it again, perform Clean build all, and run again the “update a previous build” command.

Chances are that only the new bundles will be created, with no unnecessary duplications.
At least this is what happened last time i did it.
I’ll see if this is safe and reproducible.

1 Like