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

Preloaded addressable bundles that are replaced by remote bundles

Discussion in 'Addressables' started by BFS-Kyle, Apr 18, 2019.

  1. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    Is there functionality to build a set of local bundles that is included with the build, then have those same bundles be updated via remote server?

    So far, we've been able to download them and have them cached but that only works if its online. Ideally we would like the client to run fine offline without having to download anything, then update the bundles when they are able.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    The way we decode address to <whatever> is via a file we call the catalog. When you ship your game, it'll come with a catalog. In your case, it'll make, say `"tank" == "tank.prefab in local bundleX"`.
    Then later, you can put "tank" into an online bundle (presumably tank changed). At this point, the catalog on your server will say `"tank" == "tank.prefab in remote bundleX_1"`.

    as long as the user stays offline, they will continue to use the "tank" that's local. Once they go online, the next request for "tank" will point to the online server and will require that they stay online to download it.

    So if I'm understanding you correctly, things already should work the way you are wanting. Please clarify if I misunderstand.
    -Bill
     
    BFS-Kyle likes this.
  3. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    Thank you for the reply, that pointed me in the right direction.

    We were not building building locally first with the catalogue marked as remote. So the assets would only ever work from the server.

    From my understanding, if the remote bundles are not accessible, it will default to the local bundles in the build via it's own catalogue file.
    When it's able to download them, it will cache them for next time but it will not cache the remote catalogue?

    Is there a way to update the local catalogue with the remote one?
     
  4. smiler2019

    smiler2019

    Joined:
    Apr 28, 2019
    Posts:
    2
    @unity_bill Hi,How do I custom resource bundle path. In AddressableAssetSettings, I defined the {Application. PersistenDataPath} options, running on PC, but exception on android .
    Print out the loading bundle path on android : C: \ Users \ \ AppData \ LocalLow \ xx xx