Shader asset dependency hash is not consistent on different machine

I’m currently trying to make resource patch system that independent from machine, but I found GetAssetDependencyHash() of any shader file is different for each machine runs editor.

Shader assets are referenced from variant assets, and addressable system assumes any assets referencing custom shader asset has been changed.

Does anyone have solution to make hash consistent? One thing I could try is packaging all shader assets as separated bundle, but it still makes generated addressables_content_state.bin useless.

Unity version: 2019.2.21f1
Addressables version: 1.8.4

Reproduction steps:

  • Download attached project file.
  • Right click on the shader and choose “Copy dependency hash”
  • Compare it on other machine and confirm it’s different
  • Or you can run addressable build and confirm the bundle hash is different.

5899037–629423–AddressableTest.zip (36.4 KB)

Hey there. If you haven’t yet, could you submit a bug report so we can investigate this further?

Any news about this? @TreyK-47

We also are facing this problem.

Unity 2019.4.22
Addressables 1.16.1

I’ve tested running AssetDatabase.GetAssetDependencyHash on a shader file that only includes this file: UIEffect/Resources/UIEffect.cginc at upm · mob-sakai/UIEffect · GitHub
Then I did the same on another machine (same platform), and the hashes don’t match. How can this be?

1 Like

Unsure if @Maxwell-SC put in a bug report. Would need their ticket number to check the status of this one.

Should we create a new bug report then? This bug is quite serious since it completely breaks content updates.

1 Like

Yes, at least that way you’ll be able to track updates to your report directly.