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 ...
随机推荐
- eclipse 添加svn资源库卡死。长时间等待
使用https://localhost:8443/svn/xx方式打入浏览器判断其服务器是否正常 如果正常通过,而eclipse新建库卡死时.可以等待一点时间看是否卡 问题依旧,考虑更改地址 主机名 ...
- redis下操作String
redis操作string string是redis最基本的类型 最大能存储512MB数据 string类型是二进制安全的,即可以为任何数据,比如数字.图片.序列化对象等 基本命令 设置 设置键值 s ...
- 【转】R语言 RStudio快捷键
链接地址 http://blog.sina.com.cn/s/blog_403aa80a0101ar8q.html 控制台 功能 Windows & Linux Mac 移动鼠标到控制台 C ...
- Linux设置DNS server
查看: cat /etc/resolv.conf 修改: vim /etc/resolv.conf
- 结构体中string成员的问题
在结构体中定义字符串的成员的时候要注意定义成string有时候,在某些程序中给成员赋值会崩溃,但是不确定到底什么情况会崩溃.运行报错如下: Program received signal SIGSEG ...
- vue格式化显示json数据
已经是json格式数据的,直接用标签 <pre></pre>展示. 参考:https://www.jianshu.com/p/d98f58267e40
- UI5-学习篇-13-Eclipse 开发UI5应用
1.Eclipse环境配置及组件安装 UI5-学习篇-1-Eclipse开发工具及环境搭建 2.创建项目 3.设置代理映射 打开WebContent->WEB-INF->web.xml文件 ...
- mysql 索引优化知识整理笔记
http://blog.csdn.net/zhxp_870516/article/details/8434539 http://www.jb51.net/article/49346.htm https ...
- es6 初级之---const 和 默认参数
1. const 的定义: 1.1 常量定义的时候要赋值,不赋值是会报错的: <!DOCTYPE html> <html lang="en"> <he ...
- 用python实现一个简单的服务器
打开命令行工具,输入: python3 -m http.server 8000(端口可以自己定) 通过访问:http://ip:8000/,就能给别人快速分享文件了.