Search Unity

  1. Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice

Manifest size for content updates

Discussion in 'Addressables' started by supersolid-jelte, Jan 30, 2020.

  1. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    Hi,
    I have been implementing Addressables in an existing live project and have a few questions regarding the manifest.
    Before I start, I would like to point out that my current focus has been creating and loading the asset bundles and assets, without changing any other game code. Basically, just getting the Addressables up and running before doing a big refactor to implement changes and start loading assets asynchronously.

    The set up is fairly simple.
    • All asset bundles are flagged as Static, Local Build and Local Load: as we want them included in the builds (For the moment)
    • Manifest is set as Remote Build, Remote Load and the "Build Remote Catalog" flag is ticked.
    This seems to be exactly what we want, as it create a remote manifest that we can use to do asset updates in between builds. For which a new Bundle is generated with only the changed files.

    Questions:
    • Is it normal for the manifest to be 5Mb+?
      • I guess it is, but as we haven't actually changed to using references I might be getting a wrong impression
    • Could the content update process not generate a diff of the manifest rather than an entirely new manifest?
      • I guess this would greatly depend on use cases, but for our content updates and build cycles, it would make more sense to do incremental manifest updates between builds.
    • Is there a way to include the remote catalog in the build by default?
      • Ideally we would like to have the player not download anything after installing the game on their phones.
     
    Last edited: Jan 30, 2020
  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    580
    Hey @supersolid-jelte let me see if I can answer some of your questions. Also, just to make sure we're on the same page I think what you're calling a manifest we call a catalog. It doesn't matter either way I just wanted to make sure if I say "catalog" you know we're talking about the same thing. (If that doesn't sound right let me know because that means I'm confused).

    1) This probably is correct, though not ideal. I'd have to see how large your project is but the catalogs can get fairly large. It's mainly because we've built the catalogs in such a way to focus on load performance. For instance, there are places we could use a string reference lookup table and it would probably shrink the size of the catalog but it would increase load times. Catalog size has come up before and it's definitely on our radar but there's nothing set in stone for that at the moment.

    2) You're asking if we can just generate diff patches that you can apply to your remote catalog? I wonder if you could get just the information from an incremental build to make such a patch file in the current system. I mean we don't do this now (as you already know) but that's something I'll bring up and see. I wouldn't expect this for a while if we decide to pick it up.

    3) So just for this scenario we've added a check box on the AddressableAssetSettings object that says something like "Disable Catalog Update on Startup" this will give you control over when to update your catalogs using the Addressables.CheckForCatalogUpdates and Addressables.UpdateCatalogs APIs.

    I hope at least some of that helps.
     
  3. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    Hi @DavidUnity3d, yes sorry for mixing up the terminology (still thinking in terms of asset bundles).
    1) this makes sense.

    2) yes, that's exactly what I'm asking. We probably do have enough information, or even if we didn't we could always diff the 2 json files after they have been generated. However, generating the diff is the "easy" part, modifying the addressables ContentCatalog update flow to apply the patch will require some more in-depth knowledge of the underlying system than that I currently have. Sadly, implementing the async loading will take up most of my time :).
    For now, we'll just have to make sure gzip is enabled on the requests.

    3) Yes, basically that's what I will be using for now. as our server will indicate to the client when a new update is available. However, I think there is a problem with Addressables.CheckForCatalogUpdates even when the local and remote catalogs are the same.
    In the logs it shows:
    Addressables - ContentCatalogProvider CachedHash = , RemoteHash = aecab112c8f353d2ab81c27cdd32b2b4.

    I would expect the CachedHash to be populated with the hash of the build-in catalog, which should be the same as the remote hash as there hasn't been any change to the catalog.
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    580
    In regards to applying diff patches I think that's an interesting idea. I'll have to put a ticket in our backlog to do a little research.

    For the CheckForCatalogUpdate I'll have to look into that. Are you seeing something occur in your game that appears broken?
     
  5. supersolid-jelte

    supersolid-jelte

    Joined:
    Dec 3, 2018
    Posts:
    22
    Not exactly broken, just odd behaviour.
    As the Cached Hash is empty, and thus not equal to the Remote Hash. The Catalog is downloaded, even though it is the catalog generated during the build same.
     
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    580
    It may have just been an oversight and the cached hash didn't get assigned during the build or something. We'll have to look into that.
     
unityunity