Search Unity

Project update gives all assets a new CRC

Discussion in 'Asset Bundles' started by GustavNinja, Mar 22, 2018.

  1. GustavNinja

    GustavNinja

    Joined:
    Jun 13, 2016
    Posts:
    80
    I’m working on a project where we are currently migrating from 5.2.2f to 2017.3 and it all is going smoothly except for assetbundles. We have about 5000 asset bundles and each file wether or not they have been changed has received a new CRC which will force all players to redownload all Assets.
    Since I don’t know why this happened I’d like to ask here if anyone knows why this occurred and if there is an solution for this?
    Thanks in advance.

    Edit
    I found out why this happened. Every time you update the engine it gives a different CRC Id. So even by going from 2017 3.0 to 3.1 it will give all files a new CRC. I don’t know if this is a bug or not but if needed for future updates I will probably build assetbundle in current Unity version and code in a newer version if I ever update again.

    Hope this helps someone else.
     
    Last edited: Apr 10, 2018
  2. tomerpeledNG

    tomerpeledNG

    Joined:
    Jul 14, 2017
    Posts:
    81
    Hi,

    I've added this question: https://forum.unity.com/threads/assetbundels-builds-in-between-unity-versions.528154/

    I'm also wondering how to tackle the asset bundles delta.
    Currently we are working with our own checksum calculation on the asset bundles files, but this is problematic cause the asset bundles include unity version inside (which will cause the checksum calculation to be different).

    I thought of starting to work with Unity crc calculation built-in in the asset bundles manifest, but as you mention over here it will also can be changed in between unity version (without really needed to be updated).

    Right?

    Unity, any solution for this?
     
  3. tomerpeledNG

    tomerpeledNG

    Joined:
    Jul 14, 2017
    Posts:
    81
    Just checked the difference between two versions:

    2017.3.1 vs 2017.4.1

    All the CRCs are different between the two versions, however the hashes are the same, which is quite encouraging.

    However, the hashes are different when building the assets on different machines (with the same unity version - 2017.4.1).

    What is going on?

    What is the difference in between the CRC and hash? What should we use in order to detect real changes in the assets bundles?

    Also according to the documentation it is not recommended to use the hash for versioning :

    "Note that while AssetBundleManifest.GetAssetBundleHash() may also be used for this purpose, we don’t recommend this function for versioning, as it provides just an estimation, and not a true hash calculation)."

    On the other hand, the CRC is changed between unity versions...
     
    Last edited: Apr 24, 2018
unityunity