- Home /
LoadFromCacheOrDownload Version Variable Reset?
Hello Unity Community.
When using the WWW.LoadFromCacheOrDownload method there is a version variable that can be set as you can see here. http://docs.unity3d.com/ScriptReference/WWW.LoadFromCacheOrDownload.html
When this version is set to 1 for instance, like so:
int versionNumber = 1;
WWW downloadedAssets = WWW.LoadFromCacheOrDownload("url of unity3d file", versionNumber);
Then it will download the assets and set that version number to 1. If I run the code again, it will not download it as version 1 has already been downloaded, if I set it to 2, it will download it again as one would expect. However, I am wondering where this variable is stored and how can I reset it. For instance, if I want to download version 1 and overwrite version 2 how would I do that?
I have tried PlayerPrefs.DeleteAll but it does not appear to be stored in there.
Thank you for reading.
looks like I have asked one of these unanswerable questions. I have reached the forefront of human knowledge, I have discovered unknown territory. I A$$anonymous$$ GOD! aka bump.
Answer by Bunny83 · Dec 11, 2014 at 07:37 AM
I think what you need is the Caching class and the method which would solve your problem is Caching.CleanCache. When in production you should never decrease any version code / number. If you're still in development and haven't published your application yet it wouldn't matter of course.
@Bunny83 Thank you, I used to be able to ask questions and they would be answered in an hour, now the questions get so deep that it takes 2 weeks and a direct request for viewing to be answered. I would love to know what you googled to find this answer as I have been searching for it for a long time.
You are a valuable member to the Community, Thank you.
Well, i searched for something like unity reset cache version The 4th item is the Caching class ^^
Your answer
Follow this Question
Related Questions
How do you package/retrieve Asset Bundle Dependencies 0 Answers
LoadFromCacheOrDownload non asset bundles 1 Answer
WWW::Dispose doesn't work 1 Answer
AssetBundles caching bug? 1 Answer