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

unity3d 最新5.0 AssetBundles用法

2016-03-14 01:39 330 查看

AssetBundles

原文链接:http://docs.unity3d.com/Manual/AssetBundlesIntro.html

非直译:

AssetBundle是一个资源数据组合类,开发者可随机抽取资源组合成一个AssetBundle。AssetBundle实用Unity3d专用的文件格式,任何Unity3d程序均可请求加载,可实现序列化文件,例如模型,纹理或者音效片段,甚至是序列化从大场景中分离的场景片段。AssetBundle的设计极大地简化了下载和加载的操作。AssetBundle可以组合所有Unity3d所识别的资源,如“.unity”,“.prefab”等,如果需要加载第三方资源,可做成二进制,用”bytes“做后缀,AssetBundle会识别为”TextAsset”资源。

AssetBundle实用的典型流程:

开发者打包和上传AssetBundle到服务器



Building AssetBundles. Asset bundles are created in the editor from assets in your scene. The Asset Bundle building process is described in more detail in the section for Building AssetBundles

Uploading AssetBundles to external storage. This step does not include the Unity Editor or any other Unity channels, but we include it for completeness. You can use an FTP client to upload your Asset Bundles to the server of your choice.

游戏运行时,加载资源到游戏中



Downloading AssetBundles at runtime from your application. This is

done from script within a Unity scene, and Asset Bundles are loaded

from the server on demand. More on that in Downloading Asset

Bundles.

Loading objects from AssetBundles. Once the AssetBundle is

downloaded, you might want to access its individual Assets from the

Bundle. More on that in Loading Resources from AssetBundles
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  u3d unity3d 5 AssetBundl 5-0