AssetBundle Manager
【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的更多相关文章
- 【Unity3D技术文档翻译】第1.6篇 使用 AssetBundle Manager
上一章:[Unity3D技术文档翻译]第1.5篇 使用 AssetBundles 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced Develo ...
- AssetBundle Manager and Example Scenes
示例 1:加载资源 使用 “Asset/AssetBundles/Simulation Mode” 菜单打开模拟模式 打开 “AssetBundleSample/Scenes/AssetLoader” ...
- AssetBundle Manager & Example Scenes
https://www.assetstore.unity3d.com/en/#!/content/45836 https://docs.unity3d.com/Manual/AssetBundlesI ...
- 【Unity游戏开发】AssetBundle杂记--AssetBundle的二三事
一.简介 马三在公司大部分时间做的都是游戏业务逻辑和编辑器工具等相关工作,因此对Unity AssetBundle这块的知识点并不是很熟悉,自己也是有打算想了解并熟悉一下AssetBundle,掌握一 ...
- Unity资源打包学习笔记(一)、详解AssetBundle的流程
转载请标明出处:http://www.cnblogs.com/zblade/ 本文参照unity官网上对于assetBundle的一系列讲解,主要针对assetbundle的知识点做一个梳理笔记,也为 ...
- Unity最新版打包AssetBundle和加载的方法
一.设置assetBundleName二.构建AssetBundle包三.上传AssetBundle到服务器四.把AssetBundle放到本地五.操作AssetBundle六.完整例子七.Asset ...
- [译]使用AssetBundle Manader
AssetBundle and the AssetBundle Manager 介绍 AssetBundle允许从本地或者远程服务器加载Assets资源,利用AssetBundles技术,Assets ...
- 【Unity3D技术文档翻译】第1.7篇 AssetBundles 补丁更新
上一章:[Unity3D技术文档翻译]第1.6篇 使用 AssetBundle Manager 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced ...
- 【Unity3D技术文档翻译】第1.5篇 本地使用 AssetBundles
上一章:[Unity3D技术文档翻译]第1.4篇 AssetBundle 依赖关系 本章原文所在章节:[Unity Manual]→[Working in Unity]→[Advanced Devel ...
随机推荐
- 【Jmeter自学】常见错误类型(九)
==================================================================================================== ...
- 20165205 2017-2018-2 《Java程序设计》 第三周学习总结
20165205 2017-2018-2 <Java程序设计>第三周学习总结 教材学习内容总结 学习类的概念(类体,成员变量,方法) 学会构造方法(默认和自定义构造方法) 学会创建.使用对 ...
- uva-317-找规律
无耻的抄袭了结果,三组数,从每一组数中选取一个数组成正六边形的对边,总共会有27个正六边形,从27个小六边形中选取19个组成大六边形,求大六边形的最大值 #include<iostream> ...
- linux 查看磁盘空间
linux 查看磁盘空间大小命令 df :命令是linux系统以磁盘分区为单位查看文件系统,可以加上参数查看磁盘剩余空间信息 df -hl:查看磁盘剩余空间信息,显示如下: 文件系统 ...
- 同时安装python2和python3环境
一.同时安装两个环境 https://www.cnblogs.com/zhengyihan1216/p/6011640.html 二.快速安装django: https://blog.csdn.net ...
- jQuery 移除事件与模拟事件
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...
- 应用PLSQL Developer(技巧)
以下是一些 PLSQL Developer的使用技巧. 转自:PLSQL developer常用技巧,作者:逍遥游xj
- Android ADB 基本命令
ADB很强大,记住一些ADB命令有助于提高工作效率. 获取序列号: adb get-serialno 查看连接计算机的设备: adb devices 重启机器: adb reboot 重启到bootl ...
- Retrofit添加自定义转换器
Retrofit2开始支持多种 Converter 并存,在之前,如果你遇到这种情况:一个 API 请求返回的结果需要通过 JSON 反序列化,另一个 API 请求需要通过 proto 反序列化,唯一 ...
- 白鹭引擎 - 资源文件的加载 ( RES, loadConfig, loadGroup )
class Main extends egret.DisplayObjectContainer { public constructor() { super(); this.addEventListe ...