I can’t control downloading when using WWW class. for example, I want to download A.unity3d, which is a very large file, then I want to download B.unity3d, but I don’t what to download A.unity3d again, and don’t want to continue download A.unity3d either, I just wanna suspend A.unity3d’s downloading.
I can’t find a good way to control downloading when using WWW class.
for example, I want to download A.unity3d, which is a very big file, then I want to download B.unity3d, but I don’t what to download A.unity3d again, and don’t want to continue download A.unity3d either, I just want to suspend A.unity3d’s downloading. Then , some time later, maybe I can continue A.unity3d’s downloading.
Like in this case : A’unity3d downloading 55%(not finished yet), then I suspend A’unity3d 's downloading and begin to download B’unity3d.
when I finished download B’unity3d, I continue download A’unity3d, and it’s from 55%.
You can’t suspend downloads. Either you do them and store it (standalone, mobile) or own the asset cache addon license for your title (webplayer) or its gone after (to do that, you would use the .Dispose function on the WWW object)
WWW requests are fire off and wait to end, they run in a seperate thread. Yield is only there to see if you have finished it already
Thank you dreamora. Can you explain the "asset cache addon license for your title (webplayer) " more? like ,how can i buy it, and if I have it , what can i do?
When you have it you can use the Cache.LoadFromCacheOrDownload function which will load it from your application related webplayer cache on the disk and only download if required
to get it you need to contact Unity (sales@unity3d.com if I remember right). The license is per project and significantly more expensive than pro etc and not onetime flat fee
The function is also available just like that, but without the cache addon license you are limited to the 50mb large cache that all webplayers share