Friday, April 12, 2013

Clearing the browser cache of the Unity Web Player

For my current Unity web project, I am downloading scenes as AssetBundles hosted on my server, and now I have found myself constantly uploading the updated scenes whenever I make these (constant) changes.

Problem is, when I try the game online to see how the downloaded scene looks, my main game file which is downloading these scenes keeps on using the cached scenes from before.

That's because I am downloading the AssetBundles using WWW.LoadFromCacheOrDownload

To clear the cache, just head on over to http://unity3d.com/webplayer_setup/setup-3.x/ where you will see something like this:


And from there, you can simply delete the cache, or even make sure that while you're still working on the game, don't keep a cache at all.