Search Unity

Download remote bundles in local device

Discussion in 'Addressables' started by JL_Tech_BBW, Jun 28, 2019.

  1. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    Hello,

    I started to use the Addressable Assets and it works pretty well.
    But as I move forward in my investigations for our current project, I have a question in my mind.

    Is there a way to download remote bundles somewhere on the local machine and then after use these instead of the remote, only if remotes does not have updated content ?

    We would like to create an app (mobile) where the user will be allowed to download some content packages on their device before playing. (Oculus Quest/Android)
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    It's the default behavior. If you point the catalog to a remote address, the system will fetch the latest catalog first, then use the local cache if no bundle get updated.

    You can mark each content package a label, then use Addressables.DownloadDependenciesAsync(label) to fetch them before play. Just notice that script need to be shipped with original deployment, unless you want to investigate more time on how to deliver assemblies.
     
  3. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    But if I shutdown the app or the device, are the bundles deleted from drive ?
     
  4. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    unity_bill likes this.
  5. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    Thanks, I understand.
    And I made a test with no internet connection, and my asset is loading fine from cache.