Unity3D圣典3.3版本-中文版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
AssetBundle.mainAsset 主资源
# [AssetBundle](ssetBundle.html).mainAsset 主资源 var *mainAsset* : [Object](../Object/Object.html) *Description* 描述 Main asset that was supplied when building the asset bundle (Read Only). 主资源在构建资源 boundle 时指定(只读)。 This is a convenience function that makes it easy to find the primary asset of a bundle. For example you might want to have a prefab of a character and include all textures, materials, meshes and animations files with it. But the fully rigged prefab of the character would be your mainAsset and can easily be accessed. 该功能可以方便的找到 bundle 内的主资源。例如,你也许想有一个角色的预制体并包括所有纹理、材质、网格和动画文件。但是完全操纵角色的预设体应该是你的 mainAsset 并且易于被访问。 ``` function Start () { var www = new WWW ("http://myserver/myBundle.unity3d"); yield www; //获取指定的主资源并实例化 Instantiate(www.assetBundle.mainAsset); } ```
da
2022年5月14日 12:55
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码