Hi Unity Community,
I’m encountering a non-deterministic behavior when building AssetBundles using CompatibilityBuildPipeline.BuildAssetBundles
in Unity 2022.3.22. After diagnosing the issue with WebExtract and binary2Text, I found that the difference in the AssetBundle comes down to the order of states in an Animator Controller. The differences are consistent across builds, with only the order of elements changing, and no actual content changes.
Here’s an example of the diff (highlighting the ordering issue):
I’ve attached two example files showing the differences:
CAB-ec378f21b04aed2699e1d1c89c81ab78.txt (7.8 MB)
CAB-ec378f21b04aed2699e1d1c89c81ab78 (1).txt (7.8 MB)
Steps I’ve Tried:
- Used both
CompatibilityBuildPipeline.BuildAssetBundles
andBuildPipeline.BuildAssetBundles
. - Experimented with various
BuildAssetBundleOptions
flags, including:
RecurseDependencies
UseContentHash
- And combinations of other options.
Despite these efforts, the AssetBundles still exhibit the same non-deterministic behavior, with the same diff pattern as above.
My Question:
Is this a known issue, or does anyone have insights into how to enforce deterministic builds for AssetBundles containing Animator Controllers? Any suggestions or workarounds would be greatly appreciated!
Thanks in advance!