1, unity on the management of resources API summary:
Resources:load, Loadall, LoadAsync, Unloadasset, Unloadunusedassets.
Assetbundle:loadfromfile, Loadfromfileasync, Loadfrommemory, Loadfrommemoryasync, Loadallassets, LoadAllAssetsAsync , Loadasset, Loadassetasync, Unload (True/false).
Gameobject:instantiate, Destroy, Destroyimmediate.
The above API is unity5.x almost all the memory resource management interface, all the memory management scheme is almost all implemented with the above interface.
2. How to load the file:
Loading of files within resource: Resources.load, Resources.loadall, Resources.loadasync
Supports synchronous loading of in-Package loading mode: Assetbundle.loadfromefile
Common synchronous Loading mode: Assetbundle.loadfromfile, File.Open
Common asynchronous methods (both in-package): Assetbundle.loadfromfileasync, new www, www.LoadFromCacheOrDownload
3. Compare several loading Assetbundle modes:
The advantage of this way of loading a resource file with new www is that it is not limited by the iOS platform 256 file handle, and the disadvantage is that it takes up more memory than other methods when it loads resources in this way. For Www.LoadFromCacheOrDownload this way, it takes up less memory and is in serializefile format in memory, but it is limited by the upper limit of the iOS platform 256 file handle. After unity5.3, however, Assetbundle.loadfromfileasync and www.LoadFromCacheOrDownload will be loaded automatically if the upper limit of the handle is turned into new www.
4, Assetbundle loaded into the memory state diagram: