Unity Editor下选定单个资源文件打AssetBundle
来源:互联网 发布:巴哥犬价格知乎 编辑:程序博客网 时间:2024/06/07 01:02
对Project视图中鼠标选中的单个资源文件(场景,Prefab等)进行打包
//菜单栏 [MenuItem("BuildBundle/Build One Selected Obj Bundle/Android")] //设为静态方法 static void Build1SelectedBundleAN() { //备打文件集合,当前为单个 AssetBundleBuild[] abb = new AssetBundleBuild[1]; //文件路径(当前为单个,多个文件使用数组的形式) string[] path = new string[1]; //获取文件路径(得到鼠标选中的文件); path[0] = AssetDatabase.GetAssetPath(Selection.activeObject); //备打文件路径名,从Asset/开始 abb[0].assetNames = path; //包名 abb[0].assetBundleName = "assetbundle"; //打包(“输出路径”,备打文件集合,打包设置,目标平台) BuildPipeline.BuildAssetBundles("Assets/ABs", abb, BuildAssetBundleOptions.None, BuildTarget.Android); }脚本放到Editor文件夹中。
阅读全文
0 0
- Unity Editor下选定单个资源文件打AssetBundle
- unity Editor 下Assetbundle 打包
- Unity 资源打包Assetbundle
- Unity 资源打包Assetbundle
- Unity 资源打包Assetbundle
- Unity资源打包Assetbundle
- unity 生成assetbundle文件
- Unity资源打包之Assetbundle
- Unity之资源打包Assetbundle
- Unity资源解决方案之AssetBundle
- Unity资源打包之Assetbundle
- unity-AssetBundle资源冗余检测
- unity AssetBundle 加载资源 笔记
- Unity 3D Assetbundle 资源分类
- Unity手游:资源打包Assetbundle
- Unity AssetBundle资源打包,Depend依赖关系
- 【进阶】Unity资源解决方案之AssetBundle
- 【进阶】Unity资源解决方案之AssetBundle
- Java.1面向对象基础
- iOS系统3DTouch全解析
- java反射机制及应用分析
- 【数据库SQL实战】查找所有员工入职时候的薪水情况
- 微信小程序常见错误及基本排除方法
- Unity Editor下选定单个资源文件打AssetBundle
- Android Studio安装配置学习教程指南
- Swift_枚举
- js节点的创建与删除
- 背包问题
- 字节码增强技术与AOP切面编程技术关系
- 异步的终极解决方案-ES7的Async/Await
- eclipse代码注释的设置
- Centos6 编译PHP7步骤