Search Unity

Offline behaviour not as expected

Discussion in 'Addressables' started by Paul_H23, Aug 17, 2020.

  1. Paul_H23

    Paul_H23

    Joined:
    Jun 19, 2019
    Posts:
    45
    Can anyone help me to understand the weird behaviour I'm seeing when offline please. I've got a system working, with FirebaseStorage as the hosting platform using RobinBird implementation detailed elsewhere in this forum. Works fine when online, however offline behaviour is weird.

    If I run the game while online, so I know it has downloaded the current catalog and remote assetbundles, everything is fine. Then I shutdown the game completely, and switch the device into AirPlane mode, to turn off all networking. I would expect the next call to LoadAssetAsync to work fine, pulling the requested asset (that has definitely already been used while connected) from the locally cached bundles. However, what happens is, the LoadAssetAsync.Completed fails after a timeout. In XCode I can see repeated errors that appear to be related to it trying to get the catalog hash and failing. I've set the FirebaseStorage timeout to a lower value, 10s, as per this post, https://forum.unity.com/threads/hos...es-from-firebase-storage.752789/#post-6152623, and that means when offline the load fails quicker, but I don't understand why it should fail, surely if it's offline it should just use the local hash/catalog/bundles?

    It's even weirder if I turn AirPlane mode off mid-execution. So, if I start in offline mode, get to the point where it needs to load an asset from the addressable bundle, and then, before triggering it, connect again, it still fails, repeatedly, I have to shut down the game and restart while online in order to get it to recover.


    Paul
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
  3. Paul_H23

    Paul_H23

    Joined:
    Jun 19, 2019
    Posts:
    45
    I've also mentioned this on the thread associated with the Firebase Storage handler for AddressableAssets, https://forum.unity.com/threads/hosting-plugin-to-load-addressables-from-firebase-storage.752789/, and it seems it might be related to local caching implemented in that plugin. I'll wait until I can confirm whether the problem lies in AA or in the Firebase storage code before submitting a bug report.