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的更多相关文章

  1. 【Unity3D技术文档翻译】第1.5篇 本地使用 AssetBundles

    上一章:[Unity3D技术文档翻译]第1.4篇 AssetBundle 依赖关系 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced Devel ...

  2. AssetBundle loading failed because.....已解决

    http://blog.csdn.net/ldghd/article/details/9632455 *****************************      一      ******* ...

  3. 跟我从零基础学习Unity3D开发--资源打包篇(AssetBundle)

    好久没更新了,一直在加班敢项目进度.这里和关注我的博客的童鞋表示一下歉意!这里有我录的Unity3D从零开始的视频教程大家可以关注一下:http://www.imooc.com/view/555  视 ...

  4. AssetBundle系列——资源的加载、简易的资源管理器

    每个需要进行资源管理的类都继承自IAssetManager,该类维护它所使用到的所有资源的一个资源列表.并且每个资源管理类可以重写其资源引用接口和解引用接口. 每个管理器有自己的管理策略,比如Scen ...

  5. Assetbundle的杂七杂八

    使用Assetbundle时可能遇到的坑 一 24 十一郎未分类 No Comments 转自 http://www.unitymanual.com/blog-3571-132.html 1.Edit ...

  6. 使用Assetbundle时可能遇到的坑

    原地址:http://www.cnblogs.com/realtimepixels/p/3652128.html 一 24 十一郎未分类 No Comments 转自 http://www.unity ...

  7. AssetBundle依赖关系

    原地址:http://www.cnblogs.com/realtimepixels/p/3652086.html Unity AssetBundle Dependencies In the last ...

  8. LuaFramework热更新过程(及可更新的loading界面实现)

          1.名词解释: 资源包:点击 LuaFramework  |  Build XXX(平台名) Resource,框架会自动将自定义指定的资源打包到StreamingAssets文件夹,这个 ...

  9. AssetBundle打包

    为热更新打基础(xlua\tolua) 素材.源码链接:http://www.sikiedu.com/course/74/task/1812/show 一.AssetBundle的定义和作用 1,As ...

随机推荐

  1. 自写-自动拨号测试app

    XML - Main <?xml version="1.0" encoding="utf-8"?> <android.support.cons ...

  2. Oracle 日志归档 自动清理

    exp emis/emis@orcl file=d:\backup\oracle\oracle%date:~0,10%.dmp owner=emis log=d:\backup\oracle\orac ...

  3. Robot Operating System (ROS)学习笔记4---语音控制

    搭建环境:XMWare  Ubuntu14.04  ROS(indigo) 转载自古月居  转载连接:http://www.guyuehome.com/260 一.语音识别包 1.安装         ...

  4. java容器思维导图

    转载自:https://blog.csdn.net/zbdxcyg/article/details/72330833

  5. RAD Tokyo 10.2.2

    TDialogService类 如果您是使用比较新的RAD Studio版本. 那么您应该开始改用FMX.DialogService程序单元中TDialogService类别的类别方法来取代以前的Me ...

  6. 机器学习进阶-图像梯度计算-scharr算子与laplacian算子(拉普拉斯) 1.cv2.Scharr(使用scharr算子进行计算) 2.cv2.laplician(使用拉普拉斯算子进行计算)

    1. cv2.Scharr(src,ddepth, dx, dy), 使用Scharr算子进行计算 参数说明:src表示输入的图片,ddepth表示图片的深度,通常使用-1, 这里使用cv2.CV_6 ...

  7. js event

    event jquery获取: 在jquery中调用函数中最多只能有event这一个参数,所有的值在event.data中可以获取. $('select').click(function(event) ...

  8. sqoop连接SqlServer2012示例

    sqoop import --connect 'jdbc:sqlserver://192.168.xx.xx:1433;username=sa;password=xxxx;database=WindE ...

  9. secureCRT工具下载和安装

    本文主要提供secureCRT软件下载和安装操作指导,节约软件查找和安装时间. 使用环境 32位Windows系统 软件下载 secureCRT软件和注册机下载:secureCRT 安装步骤和注意事项 ...

  10. VPS 相关

    1.一键测试 wget http://soft.laozuo.org/tools/cpu-io.shsh cpu-io.sh 2.锐速破解 wget -N --no-check-certificate ...