Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Shader asset dependency hash is not consistent on different machine

Discussion in 'Addressables' started by Maxwell-SC, May 26, 2020.

  1. Maxwell-SC

    Maxwell-SC

    Joined:
    Jun 7, 2019
    Posts:
    7
    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.
     

    Attached Files:

  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
  3. HugoClip

    HugoClip

    Joined:
    Feb 28, 2018
    Posts:
    52
    Any news about this? @TreyK-47

    We also are facing this problem.

    Unity 2019.4.22
    Addressables 1.16.1
     
  4. FranClip

    FranClip

    Joined:
    Feb 27, 2020
    Posts:
    12
    Last edited: Mar 29, 2021
    HugoClip likes this.
  5. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    Unsure if @Maxwell-SC put in a bug report. Would need their ticket number to check the status of this one.
     
  6. HugoClip

    HugoClip

    Joined:
    Feb 28, 2018
    Posts:
    52
    Should we create a new bug report then? This bug is quite serious since it completely breaks content updates.
     
    FranClip likes this.
  7. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,796
    Yes, at least that way you'll be able to track updates to your report directly.