您的位置:首页 > 移动开发 > Unity3D

Unity5.4 Assetbundles官方说明三(AssetBundle资源包的内部结构)

2016-10-25 15:16 453 查看
转载请注明出处!

  上一篇介绍了AssetBundle的压缩格式,接下来将说明一下AssetBundle资源的内部结构。(了解即可)

一个AssetBundle资源包本质上是一组对象组合成的一个序列化文件。这个文件有一个稍微不同的结构,结构的不同取决与这是一个普通资源包还是场景包。

普通资源包的结构:



 
场景资源包的结构:



 
资源包的压缩:

 


官方说明(不再翻译):
 The Compressed blocks shown above might have chunk-based compression or stream-based compression. Chunk-based compression (LZ4) means that the original data is split to chunks (subblocks) of equal size and that chunks are compressed independently.
You should use this if you want realtime decompression - random read overhead is small. Stream-based compression (LZMA) uses the same dictionary when processing the whole block, it provides the highest possible compression ratio but supports only sequential
reads.

    我将在第十一篇中给出完整的项目源码(包括资源的打包、下载资源包、加载资源包、获取资源几依赖资源、使用资源等)。下一篇将讲解AssetBundle的下载和加载。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: