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. 39.纯 CSS 创作一个表达怀念童年心情的条纹彩虹心特效

    原文地址:https://segmentfault.com/a/1190000015126240 HTML code: <div class="heart"> < ...

  2. 《算法》第四章部分程序 part 2

    ▶ 书中第四章部分程序,加上自己补充的代码,随机生成各类无向图 ● 随机生成无向图 package package01; import edu.princeton.cs.algs4.StdOut; i ...

  3. View Stack容器,按钮选择子容器

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  4. Shell 编程(循环)

    for in 循环语句 #!/bin/bash for x in one two three four do echo number $x done 例:取出passwd中每一行name 并输出 he ...

  5. 机器学习进阶-人脸关键点检测 1.dlib.get_frontal_face_detector(构建人脸框位置检测器) 2.dlib.shape_predictor(绘制人脸关键点检测器) 3.cv2.convexHull(获得凸包位置信息)

    1.dlib.get_frontal_face_detector()  # 获得人脸框位置的检测器, detector(gray, 1) gray表示灰度图, 2.dlib.shape_predict ...

  6. android除去标题栏或全屏

    想要除去标题栏只要加上下面两句代码在Activity的onCreate方法中即可(要在setContentView之前添加). requestWindowFeature(Window.FEATURE_ ...

  7. js记录用户访问页面和停留时间

    1.setInterval setInterval() 方法可按照指定的周期(以毫秒计)来调用函数或计算表达式. setInterval(code,millisec[,"lang" ...

  8. Delphi通过IE窗口句柄获取网页接口(IWebBrowser2)

    主要用到的是MSAA(Microsoft Active Accessibility) 函数:ObjectFromLResult,该函数在动态链接库 oleacc.dll 中定义. uses SHDoc ...

  9. ubuntu交换Caps 和 ESC

    https://askubuntu.com/questions/363346/how-to-permanently-switch-caps-lock-and-esc This will allow y ...

  10. C++复习:类和对象

    类和对象 基本概念 1)类.对象.成员变量.成员函数 2)面向对象三大概念 封装.继承.多态 3)编程实践     类的定义和对象的定义,对象的使用     求圆形的面积     定义Teacher类 ...