Search Unity

Diffing asset bundles

Discussion in 'Asset Bundles' started by CDF, Mar 23, 2018.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Hey, just wondering if there are any tools out there to detect changes in asset bundles, or if there's a solution inside Unity?

    Basically I want to know which asset bundles have actually changed data so I can bump their versions. It's hard to keep track of changes manually, especially after weeks of development and when you have the memory of a fly.

    How do people handle this? Is it always a manual process of keeping track of asset changes?

    Thanks
     
  2. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    The manifest the build process generates creates hash values for every bundle, which can be used to check if the contents have changed. You can store and keep track of the hash yourself or if you use the caching api and unitywebrequest it has methods of handling that for you.

    https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.GetAssetBundle.html

    If you pass a hash it will check for a locally cached version with that hash, and download it only if it isn't present.
     
  3. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Thanks, looks like I can create a simple editor tool to load and compare folders of asset bundles
     
  4. tomerpeledNG

    tomerpeledNG

    Joined:
    Jul 14, 2017
    Posts:
    81