Undeterministic asset bundle creation ?

Hello everyone,

I’m trying to make patches for a game, I have a master branch and an update branch.

A lot of my resources haven’t changed but the bundle generated for that resource is different between the master and the update though…
I figured the content update build would be able to repair that, but it does the same as when building normally

As seen most of the generated file is the same, except the parts the white part of the yellow lines…

ex : “archive:/CAB-a9b8dd83803860a922a1f1b8383b7c11%” and “archive:/CAB-abde2d28334311c2fe2c545d840e5103%” which seems to be some kind of internal id which happens to be different for some kind of reasons…

I’ve been blocked with that issue for a few days, i tried to change the addressable version from 1.8.4 to 1.8.5 but it doesn’t do anything…
I cleaned both the project to be sure and rebuilt…
A strange thing is that issue only happened on my side after installing the PS4 plugin on my computer…

Do someone have any idea ?
(Unity version : 2019.4.0f1)
Thanks.

1 Like

I’ll bounce this off the team, but I will say you are using a older version of Addressables.

So, 1.8.5 is quite old at this point and it relies on an old version of the Scriptable Build Pipeline. I’d try updating Addressables to 1.16.6 at least (or 1.17.4-preview if you want the latest) so that you can also get the new Scriptable Build Pipeline dependency in there. A lot of work has gone into both Addressables and SBP in the way of determinism since 1.8.5 so I wouldn’t be surprised if your issue is fixed in the newer version.

Hope that helps!

Hey @davidla_unity , we are on Addressables 1.16.10 (Unity 2019.4.18), and we still have issues similar to OP’s.

I’ve posted previously about this here: (Case 1297947) Addressables bundle generation is non-deterministic

We see this on several bundles, mostly on characters data (animations, graphics, etc). Maybe the issue is on our side but so far we haven’t found a reason.

2 Likes

Hm, that is odd. It could also very well be something we’re doing (in the way we’re feeding data to the Scriptable Build Pipeline) or the Scriptable Build Pipeline itself. Would you be able to submit your project in a bug report? That’d be a huge help in getting this tracked down.

I’ve been suffering because of this issue for a long time. Unity keeps making newer bundles without any changes from our side. We are using addressable for the remote static bundle and don’t want to patch or update over client version update. We are using Unity 20.1.17f with addressable 1.17.5

And we have more strange things with Addressables.

  1. Issue what OP mentioned: Unity is making new bundle files when we didn’t change any assets in the bundle
  2. Unity Cloud Build is making different bundles in different pipelines(same source/setting)
  3. Sometimes UCB build is making the same Hash added bundle but the different file(same as case#2 but this time with same file name).

Any ideas or anyone solved these issues?

Quick question: you say you aren’t changing any assets in the bundle, but are you changing non-Addressable assets that assets in the bundle depend on (at any level in the dependency tree)? That would also cause a re-build.

I would mention that the indeterminism from your machine and UCB could be due to a couple of issues:

  • There are shader indeterminism issues in the editor that you may be running into
  • If the OS of your machine vs that of the UCB are different then that could account for these changes.

Some things I might suggest:

  • Double check that you’re not modifying anything in the dependency tree of an Addressable asset.

  • If you do find that you’re modifying something in the dependency tree you can add those assets to Addressables and then keep your bundle changes isolated.

  • Put all shaders/materials into separate bundles from your other assets (this might not really work for you since there will still be bundles being rebuilt but you could keep those changes isolated)

  • Change the Bundle Naming Mode on the Content Packing & Loading schema on the Addressable Group to Filename. This will stop the bundle from using the hash in the name. I would warn that if something is getting changed then it will still be a new bundle so this might not be exactly what you’re looking for.

Let me know if you try any of this and if it does or doesn’t work for you. If you still are encountering the issue and think it might just be a legitimate bug in our code then please file a bug report with a repro project. It helps us a ton to have a good repro for cases like this.