--just finished a xlua of the heat of the project, a summary of the classification of Assetbundle resources. Pure theory, gossip knowledge, if there is a suggestion, despite mentioning, not doping code.
--Here's how AB is packaged, if downloaded, how to load.
Keyword Understanding: Dependency, being dependent, public, non-public,.
1. How to pack?
Game resources, I here are divided into two major categories.
Resident Resources
I. Resident public resources (resources that must be loaded for the main interface atlas, background music, etc.)
||. Non-resident public resources (Battle interface Atlas, because there is only login game, not into combat situation)
Non-resident resources
|||. Often repeated resources
V. Other
2. Download resources?
Download resources, my side is the version file comparison to get the required download resources, nothing to say.
A picture that explains:
3. How to load?
The main thing is this way.
I. Priority of loading
The first load is the resident public resources,
Reload frequently and repeatedly resources,
Of course, if you go into combat (a specific module), you load very public resources.
Other resources are loaded when used.
II. Releasing Resources
Resident resources must not be unload (false), which frees up resources and frees other resources.
For unload (false), or unload (true) reference http://blog.csdn.net/tyzxhxl/article/details/44541429
Unload (false) is suitable for reuse of resources, once load, no longer requires load, and there is no "dependency" with other resources.
III Cache Resources
Generally, if the resources are reused frequently, it is best to cache the gameobject of AB as needed, such as bullets.
Unity talking about Assetbundle game resources