Search Unity

Expected behaviour on connection loss

Discussion in 'Addressables' started by NicoCaru, Apr 20, 2020.

  1. NicoCaru

    NicoCaru

    Joined:
    Mar 4, 2020
    Posts:
    4
    Hi,

    I'm currently taking my first steps when working with remotely deployed bundles and I'm struggling a bit with regards to understanding dealing with connection loss/general offline use. Hoping someone could shed a little light on the process. Using 2019.3.10 and Addressable 1.7.5

    For example, I set up 2 groups of sprites, both with a "Test" label but have one of them in local storage and one served remotely. I am using a remote content catalogue to be able to add additional content at a later date without rebuilding the player. Caching is turned off for testing purposes.
    When I attempt to load assets via their "Test" label, all works fine when connected to the server. When there is no connection I (understandably) get lots of errors about being unable to load from the URL and no images at all are loaded.

    Now, the behaviour I'm wanting to produce is for only the local/cached data to be gathered from the load call if there is no internet connection. Is this possible with the current addressable setup, or do I need to do some work-around to achieve it.

    In this simple example, something like using an extra tag to differentiate local/remote and then using two load calls?

    Any thoughts or advice would be much appreciated,

    Thanks
    Nico
     
  2. NicoCaru

    NicoCaru

    Joined:
    Mar 4, 2020
    Posts:
    4
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    we are likely changing the partial-success behavior you mention. For now, you can use
    LoadResourceLocationsAsync("test") to get the locations of your multiple sprites. Then loop the result of that to load each result individually. That way any that fail are isolated.

    Moving forward we intend to support a partial success in LoadAssetsAsync, but that isn't out yet.