Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Updates of catalog not cached?

Discussion in 'Addressables' started by pahe, May 7, 2020.

  1. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    Hi guys.

    I've got the following setup and problems:
    I've got a small loader application with just a loader scene which should check for remote catalogue updates and download a scene via Addressables.LoadSceneAsync from a remote server. The AB is named after the hash of the AB (so I could put multiple versions of that scene on the remote server and only the catalogue will point to the correct AB).

    1. build includes catalogue
    When building my application, it already includes a catalogue to the last build scene AB. While this is not a major problem, I don't want to have that. Can this be deactivated somehow?

    2. updating the catalogue is not cached
    When I start my app and I download an update of my catalogue, the download is successful and I get the new url to the new AB. If I restart my application, all those updates are gone and I have again only the links of the build catalogue (see above). What do I need to do to have the new catalogue permanently replace the old one?

    3. need to clean cached ABs to load updated scene
    If I have loaded my scene once, then restart my game, update my catalogue, check if I need to download some update (yes, I need to) and load the scene, I get my old scene back and not the updated one. I have to manually clean my cache, load the updated catalogue and then the new scene gets loaded.
    In this case, I guess that the Addressables system is confused which scene it should load, as it knows the old scene from its identifier / label and the new one and doesn't know which one would be the right one.

    Anyone has some suggestions what I could be doing wrong? Unity Version 2019.3.0f3 and Addressables 1.8.3.

    Many thanks for help,
    Patrick
     
    Prodigga likes this.
  2. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,122
    Forgive me if I am misunderstanding, but this sounds like a massive bug in the content update pipeline? So you upload some new assets, download the updated cache, download the updated scene bundle, and it loads the old one still?

    Have you filed a bug report?
     
  3. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    The problem in this case is, that I haven't updated the catalogues. Though I would expect that downloaded catalogues would replace the old one, this isn't the case. So for example:

    1. I build the application with catalogue A
    2. I download my ABs with catalogue A and get ABs-A
    3. Now I build a new update and catalogue B and ABs-B
    4. I download everything with my application and now have catalogue A and B and ABs-A and -B
    5. I restart the application and try to load something (without loading catalogue B manually!), then I get ABs-A
    6. I load (manually) catalogue B and load something, then I can access the new ABs-B.

    Is this a bug? I don't know. Is this unexcepted? Yes, very! If you know it, you could work around it (like I did), but for out of the box usage, this is not something I would have excepted.
     
    Prodigga likes this.
  4. komsha86

    komsha86

    Joined:
    Jul 1, 2020
    Posts:
    1

    Hi Pahe, did you find a solution to your problem? I have the same problem too.