Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question regarding the cache

Discussion in 'Addressables' started by bsymon, Feb 26, 2021.

  1. bsymon

    bsymon

    Joined:
    Dec 11, 2016
    Posts:
    18
    Hi !

    I started looking into Addressables. Got thing to work but there is something I'm not sure to understand or if it's a bug.

    I've a Group "Network" in which there is a Sprite. This group is remote and at runtime it will be downloaded from a PlayFab CDN. It works.

    Now, I've enable the option "Disable Catalog Update on Startup", so I need to explicitly download the new version of the catalog. This works too.

    Before building the Player, I did a new content build. For my Sprite, let's say it's version A. I then upload the bundle and launch the Player. As expected, I get my Sprite version A.

    Then I update my Sprite and use "Update a Previous Build" and upload the bundle again. So now it's version B.
    I launch the Player and as expected, it is still version A (because Disable Catalog Update ...). I then trigger "Addressables.UpdateCatalogs()" and I get my Sprite version B.

    If I close the Player and reopen it, still version B which is fine.

    I then make another update to my Sprite, now version C and upload it.

    And finally, here is what I'm not sure to understand : when I launch the Player, I get back to version A automatically, but here I expect it to be version B. If I trigger "UpdateCatalogs" I get version C and if a relaunch the Player still version C.

    The thing is that each time a update my bundle, the latest cached version is ignored and I always got version A and I don't think it is normal.

    Is it the intended behaviour of Addressable or is it a bug ?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    Hello there! I'm going to bounce this off the team for a bit of insight.
     
  3. andymilsom

    andymilsom

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    294
    > Is it the intended behaviour of Addressable or is it a bug ?

    No, this sounds like it is not writing the catalog correctly.
    You should be seeing these logs when you update the catalog:

    Addressables - Content catalog load result = {0}.
    Addressables - Saving cached content catalog to {0}.

    If you only see the first, then it is not saving to the local cache location for the catalog.
    Could you make a bug report showing the issue? and we can use it to fix it.
     
  4. bsymon

    bsymon

    Joined:
    Dec 11, 2016
    Posts:
    18
    Hi ! I haven't had the time to try this issue again. I'll try again and make a bug report if necessary.