Loading AssetBundle Manifests
【Loading AssetBundle Manifests】
AssetBundle Manifest 可以用于获取dependency。
- AssetBundle assetBundle = AssetBundle.LoadFromFile(manifestFilePath);
- AssetBundleManifest manifest = assetBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
使用 GetAllDependencies 方法加载所有依赖
- AssetBundle assetBundle = AssetBundle.LoadFromFile(manifestFilePath);
- AssetBundleManifest manifest = assetBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
- string[] dependencies = manifest.GetAllDependencies("assetBundle"); //Pass the name of the bundle you want the dependencies for.
- foreach(string dependency in dependencies)
- {
- AssetBundle.LoadFromFile(Path.Combine(assetBundlePath, dependency));
- }
【unload】
AssetBundle.Unload(bool); and if you should pass true or false into the function call. Unload is a non-static function that will unload your AssetBundle. This API unloads the header information of the AssetBundle being called. The argument indicates whether to also unload all Objects instantiated from this AssetBundle.
If you were to use AssetBundle.Unload(true)
the objects that you loaded from the AssetBundle, even if they’re being currently used in the active scene. This is what can cause textures to go missing, as we mentioned earlier.
Let’s assume Material M is loaded from AssetBundle AB as shown below.
If AB.Unload(true) is called. Any instance of M in the active scene will also be unload and destroyed.
If you were instead to call AB.Unload(false) it would break the chain of the current instances of M and AB.
Loading AssetBundle Manifests的更多相关文章
- 【Unity3D技术文档翻译】第1.5篇 本地使用 AssetBundles
上一章:[Unity3D技术文档翻译]第1.4篇 AssetBundle 依赖关系 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced Devel ...
- AssetBundle loading failed because.....已解决
http://blog.csdn.net/ldghd/article/details/9632455 ***************************** 一 ******* ...
- 跟我从零基础学习Unity3D开发--资源打包篇(AssetBundle)
好久没更新了,一直在加班敢项目进度.这里和关注我的博客的童鞋表示一下歉意!这里有我录的Unity3D从零开始的视频教程大家可以关注一下:http://www.imooc.com/view/555 视 ...
- AssetBundle系列——资源的加载、简易的资源管理器
每个需要进行资源管理的类都继承自IAssetManager,该类维护它所使用到的所有资源的一个资源列表.并且每个资源管理类可以重写其资源引用接口和解引用接口. 每个管理器有自己的管理策略,比如Scen ...
- Assetbundle的杂七杂八
使用Assetbundle时可能遇到的坑 一 24 十一郎未分类 No Comments 转自 http://www.unitymanual.com/blog-3571-132.html 1.Edit ...
- 使用Assetbundle时可能遇到的坑
原地址:http://www.cnblogs.com/realtimepixels/p/3652128.html 一 24 十一郎未分类 No Comments 转自 http://www.unity ...
- AssetBundle依赖关系
原地址:http://www.cnblogs.com/realtimepixels/p/3652086.html Unity AssetBundle Dependencies In the last ...
- LuaFramework热更新过程(及可更新的loading界面实现)
1.名词解释: 资源包:点击 LuaFramework | Build XXX(平台名) Resource,框架会自动将自定义指定的资源打包到StreamingAssets文件夹,这个 ...
- AssetBundle打包
为热更新打基础(xlua\tolua) 素材.源码链接:http://www.sikiedu.com/course/74/task/1812/show 一.AssetBundle的定义和作用 1,As ...
随机推荐
- Java Swing类 颜色、按键状态判断例子代码
package rom; import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; ...
- UiAutomator 代码记录 : 遍历桌面
package test_one; import java.lang.*; import java.io.File; import com.android.uiautomator.core.UiDev ...
- 在虚拟机中安装ubuntu
初始安装: 1.安装新虚拟机时,选择稍后安装操作系统,这可以自己设置语言等信息 2.修改自定义硬件:为网卡生成一个mac地址,(这里需要注意,有时网卡会冲突,导致连接时好时坏,以后可以删除掉网卡,重新 ...
- 16.Mongodb安装
Mongodb是由c++编写的非关系型数据库,是一个基于分布式文件存储的开源数据库系统,其内容存储形式类似JSON对象,它的字段值可以包含其他文档.数组及文档数组,非常灵活. 1.相关链接: http ...
- [记录] Ubuntu 配置Apache虚拟站点
版本 Ubuntu 16.04 1 . 首先找到Apapche配置文件夹 /etc/apache2/ apache2.conf conf-enabled magic mods-enabled sit ...
- springboot 端口号
1. 读取端口号 2.多端口运行 2.
- C语言中的__LINE__宏
在C语言中,有这么四个预定义的宏: 当前文件: __FILE__ 当前行号: __LINE__ 当前日期: __DATE__ 当前时间: __TIME__ 这4个宏在代码编译的时候,由编译器替换成实际 ...
- jsfl 导出指定名称的swf
var _openDOC = fl.openDocument("file:///E|TE/dt.fla"); var _exName = _openDOC.pathURI.spli ...
- iframe+form表单提交数据
<h6>基于iframe+Form表单</h6> <iframe id="iframe" name="ifra" onclick= ...
- redis 学习笔记3(哨兵模式下分布式锁的实现以及全局唯一id的生成)
redis实现分布式锁和全局唯一id应该是较为常见的应用. 实现基于redis的setNX,以及incr命令.还是比较简单的! 搭建环境以及配置好sping整合,做了下测试,有兴趣的载下来看看,自己做 ...