Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Help Wanted How to abort DownloadDependenciesAsync?

Discussion in 'Addressables' started by Peter77, Dec 1, 2021.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,252
    Unity 2019.4.20f1, Addressables 1.19.9

    How can I abort a running
    Addressables.DownloadDependenciesAsync
    operation?
     
    Last edited: Dec 3, 2021
    phobos2077 and sozcan like this.
  2. su9257

    su9257

    Joined:
    Jun 13, 2017
    Posts:
    27
    I do need to abort the download operation for network or other reasons. This seems to be a lingering issue that Unity has never resolved.
     
  3. CineTek

    CineTek

    Joined:
    Jul 12, 2013
    Posts:
    93
    Also interested in this, but as a FYI - other games including e.g. Pokemon Unite do not pause their dynamic CDN downloads on iOS even if the user switches from WIFI to mobile even though it SHOULD either interrupt/pause or at least prompt the user.. at least according to Apple specifications
     
  4. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    348
    If you don't want to wait (like, forever) for Unity to implement this obviously needed feature, you can try to do it yourself via custom asset bundle provider. Either try using the Unload method (which *should* be called when operation is released), or just write your own download management layer and add downloads to it from custom provider, then abort directly via some static member.
     
    Peter77 likes this.
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,252
unityunity