Search Unity

Content update including more files than what has actually been changed

Discussion in 'Addressables' started by supersolid-jelte, Mar 10, 2020.

  1. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    Hi,

    I'm having a small issue with automatically generating a content update.
    As a test I only change one property in a scriptable object. yet the content update generates a lot more modified entries than the one I updated.

    below is the code I'm using:
    Code (CSharp):
    1.  
    2.             string contentStateDataPath = ContentUpdateScript.GetContentStateDataPath(false);
    3.             if (!File.Exists(contentStateDataPath))
    4.             {
    5.                 throw new Exception("Previous Content State Data missing");
    6.             }
    7.             AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
    8.             List<AddressableAssetEntry> modifiedEntries = ContentUpdateScript.GatherModifiedEntries(settings, contentStateDataPath);
    9.             ContentUpdateScript.CreateContentUpdateGroup(settings, modifiedEntries, "Content_Update");
    10.             ContentUpdateScript.BuildContentUpdate(settings, contentStateDataPath);
    11.  
    All Content groups are static and build into the application as such the content update should only include the smallest diff.
    The Update I'm expecting is something like 8kb, which was generated for iOS. However the android update was 30mb.

    I should note that this is run on jenkins build machines, which means that the Library folder is cleared between builds. For this reason we do copy the ContentStateData bin files to a shared drive and copy it into the build before creating a content update.
    My main thinking is that I'm missing some cache files that the build process does require.

    I will be going through the addressable code myself and try figure out where the inconsistency comes from, but in the mean time I was hoping someone could explain the cause if this inconsistency.
     
    Last edited: Mar 10, 2020
    IanOnWork likes this.
  2. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    One thing I noticed is that the GatherModifiedEntries does not take into account the bundles that are flagged to not be included into the build.

    After a little investigation, it seems that the hash of the assets are different (although they have not changed). Could this be due to the file system (as the android builds are generated on windows machines) or the cache server (each machine has individual cache server)?
     
  3. JmprDev

    JmprDev

    Joined:
    Apr 26, 2018
    Posts:
    16
  4. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    All the bundles are static, so that should should not be the case.
     
  5. IS_Twyker

    IS_Twyker

    Joined:
    Sep 6, 2021
    Posts:
    35