- Home /
Asset bundles caching.IsversionCached() always returns false
I would like to know when a bundle downloaded using www.loadfromcacheordownload() has been cached or no.
I am trying do do that by using Caching.IsversionCached(), however this always returns false.
Is this the correct way of doing it? Or is there any other way?
Thanks
What's the reason you are trying to deter$$anonymous$$e if it was cached? Using http://docs.unity3d.com/Documentation/ScriptReference/WWW.LoadFromCacheOrDownload.html will return the cached version if it was previously downloaded.
In other words, there's no need to check if it has been cached or not because you still just wait on the operation to finish.
I am trying to create a system which caches bundles in advance so I need to know which of the bundles you've downloaded already!
@ZenithCode I'm having trouble with this as well - did you make any further progress? (sorry I don't have enough reputation or points or whatever to upvote your question).
same problem here on android. The reason I need to check if the asset is cached or not, because if it is cached, no reason to display download scene, other wise the download scene will be displayed.
Answer by Helical · Mar 07, 2017 at 04:43 PM
I have it working in version 5.4.x
But I had the same problem. Eventually I found out that I was not testing with the FINAL URL that is actually being bundled. There is much concatenation going on to the final URL with all the versions and worldID. I would recheck that the URL you are feeding the function is the complete and final one indeed.
Context we need it to start loading stuff in the background for things we might need in the future. But we dont want to load it from cache.