Unity 5 官方打包管理工具 Asset Bundle Manager
来源:互联网 发布:伪造公司印章软件 编辑:程序博客网 时间:2024/04/28 07:04
Unity5在Asset bundle 打包管理上采用了全新的方式,不需要再对每个文件进行MD5比对,unity已经帮我们做好了,对需要打包的资源AssetBundle属性就行了,同事Unity还提供了一个打包管理工具 Asset Bundle Manager。
官方文档对这个工具的说明及使用方式,地址
官方的工具项目工程地址
说下使用方式,工具提供了一键打包,本地加载模拟,网络加载模拟。
打包很简单,设定好属性,直接打包就行。本地加载模拟,右键选择Simulation mode即可切换到此模式进行测试。
还有一个是本地网络加载模拟,在本地搭建一个资源服务器,客户端连接这个服务器来进行动态的加载资源,但是实际测试中发现会报错,经过修改,终于好了。
首先需要在BuildScript.cs里修改变量为
public static string overloadedDevelopmentServerURL = "http://192.168.1.101:7888/";
具体的IP要根据自己的电脑来设定
然后修改LaunchAssetBundleServer.cs文件,主要是Run()函数,修改后的Run函数如下
static void Run () { string pathToAssetServer = Path.Combine(Application.dataPath, "AssetBundleManager/Editor/AssetBundleServer.exe"); string pathToApp = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf('/')); pathToAssetServer = pathToAssetServer.Replace("/", "\\"); pathToApp = pathToApp.Replace("/", "\\"); KillRunningAssetBundleServer(); BuildScript.WriteServerURL(); string args = Path.Combine(pathToApp, "AssetBundles"); ProcessStartInfo startInfo = new ProcessStartInfo(pathToAssetServer); ; startInfo.Arguments = args; Process launchProcess = Process.Start(startInfo); if (launchProcess == null || launchProcess.HasExited == true || launchProcess.Id == 0) { //Unable to start process UnityEngine.Debug.LogError ("Unable Start AssetBundleServer process"); } else { //We seem to have launched, let's save the PID instance.m_ServerPID = launchProcess.Id; } }
如此便可正常使用了。
项目工程里有资源场景的加载示例,有兴趣的可以自行研究。
0 0
- Unity 5 官方打包管理工具 Asset Bundle Manager
- Unity 5: Asset Bundle 和 Asset Bundle Manager (1)
- Unity 5:使用 Asset Bundle 和 Asset Bundle Manager (2)
- Unity 5:使用 Asset Bundle 和 Asset Bundle Manager (3)
- unity之Asset Bundle资源打包加载
- 浅尝Unity 3D的Asset Bundle知识(二)-----打包基础篇
- Asset Bundle
- Asset Bundle
- Unity Asset(5)iTween
- 浅尝Unity 3D的Asset Bundle知识(一)
- unity 《专题系列》资源打包 Asset Bundles 第五节 Asset Bundles 依赖打包和加载
- Unity打包发布设置Bundle Identifier
- Unity打包的APK中Asset文件分析
- unity 《专题系列》资源打包 Asset Bundles 第一节 Asset Bundles 介绍
- unity 《专题系列》资源打包 Asset Bundles 第二节 Asset Bundles 构建
- unity 《专题系列》资源打包 Asset Bundles 第三节 Asset Bundles 加载
- unity 《专题系列》资源打包 Asset Bundles 第四节 Asset Bundles 加载manifest
- unity 《专题系列》资源打包 Asset Bundles 第六节 Asset Bundles Browser tool
- Json字符串转成List对象
- JAVA大数处理(BigInteger,BigDecimal)
- java基础知识---jdk5新特性
- OpenGL学习脚印: 视变换(view transformation)
- Uart_GetString / Uart_GetIntNum / WrUart / atoi /
- Unity 5 官方打包管理工具 Asset Bundle Manager
- Guice注入--Properties
- UIView+Extension"推出视图"
- Html 5/CSS 的学习(二) —— Bootstrap 导航栏
- Scale-aware Fast R-CNN for Pedestrian Detection
- 动态链接库
- java程序员面试——java基础(1)集合
- bootstrapping 自举
- 利用xcode snippet 解决代码块重复敲写的问题