Unity 5 官方打包管理工具 Asset Bundle Manager
2018-11-13 15:00
253 查看
分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
Unity5在Asset bundle 打包管理上采用了全新的方式,不需要再对每个文件进行MD5比对,unity已经帮我们做好了,对需要打包的资源AssetBundle属性就行了,同事Unity还提供了一个打包管理工具 Asset Bundle Manager。
官方文档对这个工具的说明及使用方式,地址
官方的工具项目工程地址
说下使用方式,工具提供了一键打包,本地加载模拟,网络加载模拟。
打包很简单,设定好属性,直接打包就行。本地加载模拟,右键选择Simulation mode即可切换到此模式进行测试。
还有一个是本地网络加载模拟,在本地搭建一个资源服务器,客户端连接这个服务器来进行动态的加载资源,但是实际测试中发现会报错,经过修改,终于好了。
首先需要在BuildScript.cs里修改变量为
public static string overloadedDevelopmentServerURL = "http://192.168.1.101:7888/";
- 1
然后修改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; } }
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
项目工程里有资源场景的加载示例,有兴趣的可以自行研究。
给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
相关文章推荐
- Unity 5 官方打包管理工具 Asset Bundle Manager
- Unity 5 官方打包管理工具 Asset Bundle Manager
- Unity 游戏框架搭建 (十一) 简易AssetBundle打包工具(一)
- Unity 游戏框架搭建 (十一) 简易AssetBundle打包工具(一)
- Unity 游戏框架搭建 (十二) 简易AssetBundle打包工具(二)
- Unity 游戏框架搭建 (十二) 简易AssetBundle打包工具(二)
- Unity 游戏框架搭建 (十二) 简易AssetBundle打包工具(二)
- Unity之AssetBundle自动打包工具
- unity 5 Assetbundle 打包 scene 工具
- Unity 5.X扩展编辑器之打包assetbundle
- 【Unity】AssetBundle和AssetBundle Manager的使用和介绍(流程和依赖关系)
- Unity资源管理——使用UnityWebRequest从云端下载Assetbundle包
- Unity5 AssetBundle 打包以及加载
- Unity资源打包学习笔记(一)、详解AssetBundle的流程
- Unity资源打包之Assetbundle
- Unity AssetBundle管理(一)
- Unity5.x版本AssetBundle打包研究
- unity 打包AssetBundle
- Unity—AssetBundle的打包及四种加载资源方式
- Unity热更新专题(五)如何打包AssetBundle