Unity 4.x 资源打包
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor; public class ExportAssetBundles : MonoBehaviour
{
//在Unity编辑器中添加菜单
[MenuItem("Assets/Build AssetBundle From Selection")]
static void ExportResource()
{
//打开保存面板
string path = EditorUtility.SaveFilePanel("Save Resource", string.Empty, "New Resource", "assetbundle");
if (path.Length > 0)
{
//选择要打包的对象
Object[] selections = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); //打包
BuildPipeline.BuildAssetBundle(Selection.activeObject, selections, path, BuildAssetBundleOptions.CompleteAssets | BuildAssetBundleOptions.CollectDependencies, BuildTarget.StandaloneWindows);
}
} [MenuItem("Assets/Save Scene")]
static void ExportScene()
{
string path = EditorUtility.SaveFilePanel("Save Resource", string.Empty, "New Resource", "unity3d"); if (path.Length > 0)
{
Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); //具体到工程中,需要动态设置
string[] scenes = { "Assets/Scene1.unity" }; BuildPipeline.BuildPlayer(scenes, path, BuildTarget.StandaloneWindows, BuildOptions.BuildAdditionalStreamedScenes);
}
}
}
Unity 4.x 资源打包的更多相关文章
- Unity中AB资源打包简单的脚本
脚本应该放在Editor文件夹下 using System.Collections; using System.Collections.Generic; using UnityEngine; usin ...
- Unity中资源打包成Assetsbundle的资料整理
最近在研究Unity中关于资源打包的东西,网上看了一堆资料,这里做个整合,说整合,其实也就是Ctrl-C + Ctrl-V,不是原创 首先为了尊重原创,先贴出原创者的文章地址: http://blog ...
- Unity手游之路<十一>资源打包Assetbundle
http://blog.csdn.net/janeky/article/details/17652021 在手游的运营过程中,更新资源是比不可少的.资源管理第一步是资源打包.传统的打包可以将所有物件制 ...
- Unity资源打包学习笔记(二)、如何实现高效的unity AssetBundle热更新
转载请标明出处:http://www.cnblogs.com/zblade/ 0x01 目的 在实际的游戏开发中,对于游戏都需要进行打补丁的操作,毕竟,测试是有限的,而bug是无法预估的.那么在手游中 ...
- Unity资源打包学习笔记(一)、详解AssetBundle的流程
转载请标明出处:http://www.cnblogs.com/zblade/ 本文参照unity官网上对于assetBundle的一系列讲解,主要针对assetbundle的知识点做一个梳理笔记,也为 ...
- Unity资源打包之Assetbundle
转 Unity资源打包之Assetbundle 本文原创版权归 csdn janeky 所有,转载请详细注明原创作者及出处,以示尊重! 作者:janeky 原文:http://blog.csdn.n ...
- [Unity Asset]AssetBundle系列——游戏资源打包
转载:http://www.cnblogs.com/sifenkesi/p/3557231.html 将本地资源打包,然后放到资源服务器上供游戏客户端下载或更新.服务器上包含以下资源列表:(1)游戏内 ...
- unity3d进行脚本资源打包加载
原地址:http://www.cnblogs.com/hisiqi/p/3204752.html 本文记录如何通过unity3d进行脚本资源打包加载 1.创建TestDll.cs文件 public c ...
- Unity读取AssetBundle资源全教程(所有读取方式)
读取/加载 AssetBundle 资源的多种方式 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Ch ...
随机推荐
- 7.MySQL必知必会之用通配符进行过滤-like
用通配符进行过滤-like 1. like操作符 先说两个概念:
- C# NPOI 操作excel
转载的文章,方便自己查看. 一.下载NPOI:http://down.gougou.com/down?cid=DAEA322D9D7F934B898077FB01C3A8CB02A746E6 二.项目 ...
- firefox历史版本下载链接
http://ftp.mozilla.org/pub/firefox/releases firefox版本42以上的用不了firebug,需要装版本42以下的,否则用不了
- 【转】svn http://提示svn: Unrecognized URL scheme错误
转自:http://blog.csdn.net/l241002209/article/details/8547943 SVN这个东西虽然不好用(当然也是因为自身没有重视,但是谁让GIT这么好用呢…!) ...
- 微信小程序的功能开发工具跟公众号的差别,小程序是一种减负思维对简单APP是巨大打击
微信小程序的功能开发工具跟公众号的差别,小程序是一种减负思维对简单APP是巨大打击 摘要: 小程序和公众号最大的区别有如下四点:1.小程序没有粉丝,开发者在后台能看到的只能是累计用户访问数以及实时统计 ...
- [分享] 采用opencv_cascadetrain进行训练的步骤及注意事项 [复制链接]
http://f.dataguru.cn/thread-725364-1-1.html 很有用的一个帖子 转自:http://blog.csdn.net/xidianzhimeng/article/d ...
- vc编辑器常用设置
代码格式化 1.选中代码: 2.ctrl+K: 3.ctrl+F; 显示行号
- 08: python基础练习题
1.while循环实现输出2 - 3 + 4 - 5 + 6 ... + 100 的和 # 使用while循环实现输出2 - 3 + 4 - 5 + 6 ... + 100 的和 s = 0 i = ...
- QTQuick控件基础(3)视图
1.spliteview 2.stackview ApplicationWindow {visible: truewidth: 640height: 480MouseArea{anchors.fill ...
- 字符编码之间的相互转换 UTF8与GBK(转载)
转载自http://www.cnblogs.com/azraelly/archive/2012/06/21/2558360.html UTF8与GBK字符编码之间的相互转换 C++ UTF8编码转换 ...