when i look throught the document, i know www.LoadUnityWeb approach will unload all objects, scripts and static variables from the previous .unity3d file。Do the two .unity3d files shared the total web cache size 50MB or separate?
I want use the approach WWW.LoadFromCacheOrDownload to load scene one by one, all the scenes shared the total web cache 50MB or or separate?
There are a couple of things to talk about. Firstly, when running in a webplayer, all WWW APIs will use the web browser to fetch the data you ask for. The web browser will use its normal caching feature to avoid fetching things from the web server. (In the way that many of the files that this website uses, images and style sheets and Javascript can be cached by the browser). So, if you use WWW.LoadUnityWeb()
your unity3d file might already be in the browser cache.
Secondly, WWW.LoadFromCacheOrDownload()
will make use of the cache. This is a Unity thing, and not a browser thing. By default this cache is 50M in size, and stores asset bundles in a decompressed form, since the browser cache might have them in a compressed form. Unity .unity3d
files are not stored in the cache.
So, to answer your questions, WWW.LoadUnityWeb
is used to load unity3d files, and WWW.LoadFromCacheOrDownload
loads asset bundles and stores them in the cache.