AssetBundle Manager

  AssetBundleManager是一个款Unity公司制作的Unity库。

1、Simulation Mode

  The main advantage of using Simulation Mode is that Assets can be modified, updated, added, and deleted without the need to re-build and deploy the AssetBundles every time.

  It is worth noting that AssetBundle Variants do not work with Simulation Mode. If you need to use variants, Local AssetBundle Server is the option you need.

2、Local AssetBundle Server

  AssetBundleManager在Asset目录中提供了Build选项。

3、AssetBundleManager.Initialize()

  The AssetBundle Manager uses this manifest you load during the Initialize() to help with a number of features behind the scenes, including dependency management.

IEnumerator Start()

{
yield return StartCoroutine(Initialize());
}
IEnumerator Initialize()
{
var request = AssetBundleManager.Initialize();
if (request != null)
yield return StartCoroutine(request);
}

4、Loading Assets

IEnumerator InstantiateGameObjectAsync (string assetBundleName, string assetName)

{
// Load asset from assetBundle.
AssetBundleLoadAssetOperation request = AssetBundleManager.LoadAssetAsync(assetBundleName, assetName, typeof(GameObject) );
if (request == null)
yield break;
yield return StartCoroutine(request);
// Get the asset.
GameObject prefab = request.GetAsset<GameObject> ();
if (prefab != null)
GameObject.Instantiate(prefab);
}

5、Loading Scenes

IEnumerator InitializeLevelAsync (string levelName, bool isAdditive)

{
// Load level from assetBundle.
AssetBundleLoadOperation request = AssetBundleManager.LoadLevelAsync(sceneAssetBundle, levelName, isAdditive);
if (request == null)
yield break;
yield return StartCoroutine(request);
}

6、ActiveVariants

IEnumerator InitializeLevelAsync (string levelName, bool isAdditive, string[] variants)

{
//Set the activeVariants.
AssetBundleManager.ActiveVariants = variants;
// Load level from assetBundle.
AssetBundleLoadOperation request = AssetBundleManager.LoadLevelAsync(variantSceneAssetBundle, levelName, isAdditive);
if (request == null)
yield break;
yield return StartCoroutine(request);
}

AssetBundle Manager的更多相关文章

  1. 【Unity3D技术文档翻译】第1.6篇 使用 AssetBundle Manager

    上一章:[Unity3D技术文档翻译]第1.5篇 使用 AssetBundles 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced Develo ...

  2. AssetBundle Manager and Example Scenes

    示例 1:加载资源 使用 “Asset/AssetBundles/Simulation Mode” 菜单打开模拟模式 打开 “AssetBundleSample/Scenes/AssetLoader” ...

  3. AssetBundle Manager & Example Scenes

    https://www.assetstore.unity3d.com/en/#!/content/45836 https://docs.unity3d.com/Manual/AssetBundlesI ...

  4. 【Unity游戏开发】AssetBundle杂记--AssetBundle的二三事

    一.简介 马三在公司大部分时间做的都是游戏业务逻辑和编辑器工具等相关工作,因此对Unity AssetBundle这块的知识点并不是很熟悉,自己也是有打算想了解并熟悉一下AssetBundle,掌握一 ...

  5. Unity资源打包学习笔记(一)、详解AssetBundle的流程

    转载请标明出处:http://www.cnblogs.com/zblade/ 本文参照unity官网上对于assetBundle的一系列讲解,主要针对assetbundle的知识点做一个梳理笔记,也为 ...

  6. Unity最新版打包AssetBundle和加载的方法

    一.设置assetBundleName二.构建AssetBundle包三.上传AssetBundle到服务器四.把AssetBundle放到本地五.操作AssetBundle六.完整例子七.Asset ...

  7. [译]使用AssetBundle Manader

    AssetBundle and the AssetBundle Manager 介绍 AssetBundle允许从本地或者远程服务器加载Assets资源,利用AssetBundles技术,Assets ...

  8. 【Unity3D技术文档翻译】第1.7篇 AssetBundles 补丁更新

    上一章:[Unity3D技术文档翻译]第1.6篇 使用 AssetBundle Manager 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced ...

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

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

随机推荐

  1. js:浏览器插件

    1.chrome background.js //chrome.webRequest.onBeforeRequest.addListener(function(info) { // chrome.ta ...

  2. C#用log4net记录日志

    1.首先安装 log4net. 2.新建 log4net.config 文件,右键-属性 “复制到输出目录”设置为“始终复制” 3.设置 log4net.config 配置文件 <?xml ve ...

  3. 对比各节点host 与 标准节点host差异脚本

    把各节点host拷贝到一台节点 这可以采用读主机名配置的方式 我这里偷懒了 echo 'starting' ssh hadoop01 "cp /etc/hosts ~/hadoop01-ho ...

  4. WebForm(response内置函数)#转

    利用提供的内置对象,可以实现页面之间的数据传递及实现一些特定的功能,如:缓冲输出,页面重定向等等. Response :响应,反应 Request:请求 Server:服务器 Application: ...

  5. 4. Tomcat内存溢出解决

    1.  java.lang.OutOfMemoryError: PermGen space a.如果tomcat是以bat方式启动的,则如下设置: 修改TOMCAT_HOME/bin/catalina ...

  6. redistemplate优雅地操作redis redis 工具类

    参考:https://www.cnblogs.com/superfj/p/9232482.html redis 工具类 package com.service; import org.springfr ...

  7. jsp中文乱码

    <%@page pageEncoding="UTF-8"%> <meta http-equiv="Content-Type" content= ...

  8. 【ASP.NET 进阶】判断访问网站的客户端是PC还是手机

    主要就是通过客户端传递的User-agent来判断访问网站的客户端是PC还是手机,.NET中就是Request.ServerVariables["HTTP_USER_AGENT"] ...

  9. element(vue.js)+django 整合

    近期开始接触Python,从web开发入门.尝试Django与vue整合,大概分3个阶段: 1.基于Django开发web后端 2.基于element开发好前端 3.前后端整合 参考:https:// ...

  10. 深度学习原理与框架-卷积神经网络基本原理 1.卷积层的前向传播 2.卷积参数共享 3. 卷积后的维度计算 4. max池化操作 5.卷积流程图 6.卷积层的反向传播 7.池化层的反向传播

    卷积神经网络的应用:卷积神经网络使用卷积提取图像的特征来进行图像的分类和识别       分类                        相似图像搜索                        ...