Addressables.DownloadDependenciesAsync loads assets from a key, which are visibly downloaded to C:\Users\USERNAME\AppData\LocalLow\Unity, taking a few seconds to complete. Running it again completes immediately.
Addressables.ClearDependencyCacheAsync with the same key appears to do nothing at all. Files still exist in the cache folder. Downloading again completes immediately, suggesting that it’s still cached.
Caching.ClearCache() does work, clearing the cache folder and making the download call take a few seconds to complete, but clears the entire cache so isn’t a great solution.
After circulating with the team, it was suggested that you update to a new version of Addressables - please let us know if the problem persists after doing so.
I’m still seeing this error: “Exception: Attempting to use an invalid operation handle”
I’ve upgraded to Addressables v1.16.15.
Admittedly I’m stuck with an old version of Unity, 2018.4.29.
So, for the throwing the invalid handle exception, I just did a little test and I see that. There’s a workaround you should be able to use where you use the version of the API that returns an operation handle and pass in false to “autoReleaseHandle”. Then you can yield return on the handle and release it yourself after it completes. This, of course, isn’t ideal.
If that workaround works for you I’d be curious to know if you’re still seeing issues with the files not getting cleared. That’s what we thought we cleared but obviously missed these other cases. I’ll have to check our test suite regarding this API. It sounds like there are some pretty egregious holes in our tests.
If the files still also aren’t getting cleared then that’s really not good. I’m throwing in a ticket for the invalid handle thing but I’ll update it on our end if the files aren’t clearing correctly.
Terribly sorry about the delay in attention to this and the inconvenience this has caused.