Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Building asset bundles on different machine results in different hash

Discussion in 'Asset Bundles' started by Ender_7, Jul 2, 2019.

  1. Ender_7

    Ender_7

    Joined:
    Nov 22, 2015
    Posts:
    10
    Hi there,
    I am currently having an issue where building asset bundles for the same project on different computers is resulting in different hash's for all the produced asset bundles. This means that everytime someone wants to rebuild the bundles after a small change they have to rebuild all of the asset bundles as all their hash's have changed.

    Our projects are synced using svn and we only version the Assets, ProjectSettings, and AssetBundles folders.
    We are using Unity 2017.4.22f1

    Looking at the manifests for the produced bundles show that both the CRC and the AssetFileHash change even when there are no changes to any of the bundled files.

    We build our bundles using
     BuildPipeline.BuildAssetBundles(path + "/", BuildAssetBundleOptions.IgnoreTypeTreeChanges, EditorUserBuildSettings.activeBuildTarget);

    Where the editors build target is set to PC Standalone.

    Its also might be worth noting that the order of the dependencies listed in the manifest is sometimes different as well, which leads me to believe that the build process is not entirely deterministic.

    Does anyone know what could be causing these hashes to be different? Or know of a solution to prevent having to rebuild all the asset bundles for a change on 1 asset?

    Edit: Its also just occurred to me that clients will be redownloading asset bundles that they already have if built on a different machine due to us using the manifests hash as a metric for when an asset bundle has changed and needs to be redownloaded. This makes it a pretty big deal for us.
     
    Last edited: Jul 3, 2019
  2. Ender_7

    Ender_7

    Joined:
    Nov 22, 2015
    Posts:
    10
    We have since worked out that having the build target set to windows x86 will produce different asset hashes to x86_64. We have resolved our issue by ensuring that all our machines are using the same architecture.
     
unityunity