Search Unity

LoadAssetAsync while DownloadDependenciesAsync is ongoing

Discussion in 'Addressables' started by AllanSmithZ3, Jun 23, 2021.

  1. AllanSmithZ3

    AllanSmithZ3

    Joined:
    May 21, 2019
    Posts:
    23
    Hi, what would happen in the case mentioned in the title? I have a system that will start pre-loading addressables before they need to be used, say for example, dowloading a level pack from 11 to 20 when the user reaches level 8... but, what happens if I try to "LoadAssetAsync" while I am "DownloadDependenciesAsync" somewhere else, for the same asset?

    Does the download continue and when its done, load asset async is smart enough to grab the now downloaded file, does it attempt to download again because when it was called it wasnt downloaded yet...? I imagine this is pretty standard procedure so I am hoping that it will handle this case elegantly (and wait for the download rather than download again) but, I may be wrong and there is a better way to go about this stuff.

    Best,
    Allan