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. Python开发【模块】:Celery 分布式异步消息任务队列

    Celery 前言: Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, 如果你的业务场景中需要用到异步任务,就可以考虑使用celery, 举几个 ...

  2. c++ maps使用

    #include <iostream> #include <stdio.h> #include <memory.h> #include <queue> ...

  3. uva-317-找规律

    无耻的抄袭了结果,三组数,从每一组数中选取一个数组成正六边形的对边,总共会有27个正六边形,从27个小六边形中选取19个组成大六边形,求大六边形的最大值 #include<iostream> ...

  4. Mysql 多字段去重

    使用group by去重现在有如下表 id name age1 张三 232 李四 343 张三 234 李四 32 需求 : 按照name和age字段联合去重 sql如下 select * from ...

  5. ucenter

    1 UCenter 的目录结构 2API接口 3返回标签数据示例 (PHP) 4应用接口函数 5短消息接口函数 6积分接口函数 7邮件接口函数 8事件接口函数 9头像接口函数 10好友接口函数 11用 ...

  6. a标签自执行点击事件

    //html <a href='http://www.baidu.com' ><button id='sss'>百度</button></a> //原生 ...

  7. Python基础5 常用模块学习

    本节大纲: 模块介绍 time &datetime模块 random os sys shutil json & picle shelve xml处理 yaml处理 configpars ...

  8. Android编程权威指南(第三版)- 2.8 挑战练习:添加后退按钮

    package com.example.geoquiz; import android.support.v7.app.AppCompatActivity; import android.os.Bund ...

  9. element 表格无法绑定服务返回数据

    无法直接绑定返回的Object属性,需要用js做一次对象转换后,才能绑定 <template> <div> <!--<button>添加服务器</but ...

  10. HTML学习-2标记标签-2

    三.表单元素 ①<form></form>表单标签,代表表单 主要属性:1.action提交到的页面.   2.method数据提交方式(get显示提交,有长度限制.post隐 ...