Downloading an AssetBundle through the WWW class, then trying to download the same AssetBundle again through the WWW class throws this error:
The asset bundle ‘pathToAssetBundle.lba’ can’t be loaded because another asset bundle with the same files are already loaded
UnityEngine.WWW:get_assetBundle()
Is there a cache of these objects somewhere we can get at and possibly clear out?
It would be really convenient if Unity would handle this caching for us since the alternative is to write large and complex object repositories.
On the webplayer, the caching technology requires a special license. For informations please contact sales@unity3d.com (it was mentioned by HiggyB that it is really expensive though)
If the file is small enough it will be handled by the browser cache. In that case you could / would have to use a php that tells the browser not to cache it in the header it uses, that should solve the issue there unless I’m wrong.
I know the thread is a bit old, but it’s exactly my problem right now.
I’m loading an asset bundle from HD (that file is previously downloaded from server). The problem is, when I quit a scene I need to clear that Cache. Unfortunatly, I’ve both tried:
If you need to instantiate content again you need to redownload it, given you unloaded it before, thats correct.
But doing so shouldn’t be a problem if it is no longer present and its content no longer instantiated.
The file is on a iPhone device, so it’s not downloaded from the server again it is still there. But, I need to unload it to save as much memory as possible. That’s why I want to find a way to load it again.
Actually, isn’t suppose to consider that it is not already loaded after I’ve destroyed it?
Well, I’m doing Unload on the object and I even tried to use destroy too as we can see on my previous post. Isn’t enough to be sure that all instantiated parts are gone? (I’m not copying this object anywhere else)
Unload(True) technically should be enough but your second line does not mean anything because thats not the asset you want to destroy. you want to destroy the main asset you instantiated
The second line was just a test which were not used at the same time of the first, I should have specified!
With Unload(true), I’m going to test more then, I think the problem is on my side. I’ll give news if it still not working. But for now, I think there is a case where my Unload isn’t called, so this is why I ran into that bug.