AssetBundle.Unload Manual     Reference     Scripting  
Scripting > Runtime Classes > AssetBundle
AssetBundle.Unload

function Unload (unloadAllLoadedObjects : bool) : void

Description

Unloads all assets in the bundle.

Unload frees all the serialized data of objects inside the bundle.

When unloadAllLoadedObjects is false, serialized data for assets inside the bundle will be unloaded, but any actual objects you instantiated from this bundle will be kept intact. Of course you won't be able to load any more objects from this bundle.

When unloadAllLoadedObjects is true, all objects that were loaded from this bundle will be destroyed as well. If there are game objects in your scene referencing those assets, the references to them will become missing.