AssetBundles and Addressables have related workflows for ensuring deterministic builds.
When building AssetBundles, every referenced asset and dependency must remain identical. Avoid timestamps or build-date suffixes in AssetBundle names and use static identifiers or semantic versions.
By design, you must build AssetBundles deterministically, independent of whether incremental builds are enabled.
If clearing the cache breaks AssetBundle determinism, your build process has non-deterministic elements that need to be fixed. A common way to trace this issue back is as follows:
For more information about building AssetBundles, refer to Build assets into an AssetBundle.
Because the Addressables system is built on top of the AssetBundle API, all the determinism best practices from the previous AssetBundle section apply to Addressables. Addressable builds are deterministic when the build environment and inputs are identical.
The deterministic behavior of Addressables also depends on both the Scriptable Build Pipeline (SBP) and the Addressable hash calculation.
Because SBP calculates the content-based hash from the build outputs, it’s more sensitive to changes compared to AssetBundle hashing, which Unity computes from the build inputs.
In AssetBundle workflows, a non-deterministic build might produce the same cache identifier, such as an input-based hash or a filename, despite generating different binary content. This can lead to reusing outdated cached AssetBundles. SBP hashes the build output to avoid this issue.
Like AssetBundles, both the Addressable assets and all their referenced dependencies must be identical across builds to ensure determinism.
Addressables uses a content hash that SBP generates for caching. The SBP hash calculation isn’t limited to the binary content of the AssetBundle. It also includes the names of all dependent AssetBundles referenced by the target AssetBundle. For more information, refer to Addressable asset dependencies.
If your project uses Editor automation, such as custom scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary that automatically assign assets to Addressable groups, ensure the following:
Every Addressables build automatically creates a build layout report, which includes information about all the built assets in your project. For more information, refer to Create a build report.
For binary-level inspection, use the UnityDataTools project which can dump or export binaries into readable databases or text files, allowing detailed comparison of serialized data down to individual component fields.