Search Unity

Question Basic Understanding of Addressables

Discussion in 'Addressables' started by LukeDawn, Sep 13, 2020.

  1. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    I use assetbundles heavily and am toying with a move to addressables, but there's a couple of ideas that I'm failing to grasp:-

    1. Downloading and caching.
    If I have an item "big sword" with all it's mats, models, prefab, etc stored as an addressable, when the client requires the item, it's addressable is retrieved and cached locally.
    On subsequent playing sessions, is that addressable still in the cache and not downloaded again?

    2. Caching and updating.
    Presuming the item's addressable is cached locally, and I update the big sword, and rebuild it's addressable, does the client still use the locally cached version, or is there some chatter between client and addressable server so the client knows to ditch the local version and download the latest version?

    Any insights would be greatly appreciated.
     
    FlightOfOne likes this.
  2. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    I'm also experimenting heavily with addressables to add a patching system in my game and this is what I found out.

    Ye if the bundle didn't change, it won't get downloaded again and the one in the local cache is used.

    If the bundle changed it gets downloaded and cached, then that is used.

    Except, for some reason, the previous bundle doesn't get removed.
    No idea why it doesn't make any sense. They said a year ago they would fix this.

    I've been trying to find a way to compare catalogs or something to delete every bundle not in the catalog but the documentation is an absolute mess so just gonna ditch it untill they add the functionality I guess.

    If you have lots of updates the cache is just gonna increase and increase.

    Aside from that the unity cache has a built in cleaning system of 150 days, so unused assets will just get removed if I understand correctly.
    So if you don't play for half a year and then launch the game I think everything gets redownloaded

    ¯\_(ツ)_/¯
     
    ProtoTerminator and LukeDawn like this.
  3. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Thank you very much @lejean that's the sort of info I just couldn't pick out of what little documentation there is.

    I wonder if that 150 days would be an auto cleanup of old versions of bundles too, preventing the ever increasing cache.
     
  4. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Just anything that's unused, what ever that means.
    But I simply want to keep all latest bundles regardless of time past.
    It's very odd.
     
    LukeDawn likes this.
  5. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    To my mind this isn't ready for prime time and production yet. I'm going to stick with AssetBundles and my own manifest system for downloading and caching.