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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Building addressables on different machines leads to bundles with different hashes

Discussion in 'Addressables' started by petitbas, Nov 5, 2019.

  1. petitbas

    petitbas

    Joined:
    Sep 9, 2014
    Posts:
    17
    Two different machines (same version of Unity 2019.2.11f1 on Mac OS 10.14.6) pulling the exact same content from Collab and building addressables content leads to different file sizes/hashes (and different catalog entries).

    Is it not possible to build addressables content on interchangeable machines (much less interchangeable os)?

    Has anyone else run into this?
     
  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey @petitbas this is a known issue. On Asset Database V1 there are issues with determinism across different machines. Shaders are a known component that can cause Asset Hashes to be different across machines but there may be others as well.

    You're using 2019.2 so I think you should have the option to turn Asset Database V2 on though I'm not sure if changing to V2 will have other unintended side effects with Addressables at the moment so take that into account before switching. But it might be worth a try if it's crucial to you. If you already have V2 turned on in the editor it may be a different issue causing the indeterminism.
     
  3. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    There is a problem with Addressables for SpriteAtlas. It is not necessary to have different computers, just enough to have different folders with the project and the hash of the SpriteAtlas texture will be different. Unity does nothing to fix this error.
     
  4. tgrotte

    tgrotte

    Joined:
    Apr 17, 2019
    Posts:
    25
    Is this another way of saying that Unity's asset bundle hashing is unreliable in general and should not be used as a hash/version number for UnityWebRequest's GetAssetBundle method? I came across some official documentation stating that Unity's hashes are not a true hash and should not be used for versioning here in Section 5.2.3 on Built-in Caching. This is also consistent with a lot of experience I have, where I've seen Unity producing the same hash value for bundle versions with slightly different content. Could you offer some recommended ways of doing versioning then? And are you saying the Unity's hashing is reliable for versioning with Asset Database V2?