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

AssetDatabase.GetAssetDependencyHash(file) may get different value

Discussion in 'Asset Database' started by yingyingle, Apr 3, 2020.

  1. yingyingle

    yingyingle

    Joined:
    Jul 10, 2012
    Posts:
    5
    I did't change any assert,only restart unity,but i find the value of one file may change when call AssetDatabase.GetAssetDependencyHash.So it will cost a long time to Build Assebundle use SBP even if there are nothing change,becaust the buildCache won't work if the dependecyHash change.
    ps:The file has extension whit .compute,and the hash may change back the same if i restart unity many time.
     
  2. fedorenkosergiy

    fedorenkosergiy

    Joined:
    Jun 11, 2014
    Posts:
    8
    Hi, did you find a solution?
    I faced the same bug but with a .spriteatlas asset
     
  3. fedorenkosergiy

    fedorenkosergiy

    Joined:
    Jun 11, 2014
    Posts:
    8
    Update: looks like unity may update line endings on restart or after asset bundles build. And CVS might ignore this type of changes.
     
  4. yingyingle

    yingyingle

    Joined:
    Jul 10, 2012
    Posts:
    5
    I found that after reimport the asset,the value of the asset by call GetAssetDependencyHash won't never change
     
    fedorenkosergiy likes this.