unity5.5打包
https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildAssetBundles.html
has been made obsolete. Please use the new AssetBundle build system introduced in 5.0 and check BuildAssetBundles documentation for details.'
BuildPipeline.BuildAssetBundles
Parameters
outputPath | Output path for the AssetBundles. |
assetBundleOptions | AssetBundle building options. |
targetPlatform | Chosen target build platform. |
Returns
AssetBundleManifest The manifest listing all AssetBundles included in this build.
Description
Build all AssetBundles specified in the editor.
Use this function to build your asset bundles, after you have marked your assets for inclusion in named AssetBundles. (See the manual page about Building
AssetBundles for further details). This function builds the bundles you have specified in the editor and will return the manifest that includes all of the included assets. if the build was successful and false otherwise. Additionally, error messages are
shown in the console to explain most common build failures such as incorrect target folder paths.
The outputPath
is a path to a folder somewhere within the project folder where the built bundles will be saved (eg, "Assets/MyBundleFolder"). The folder will not be created automatically and the function will
simply fail if it doesn't already exist.
The optional assetBundleOptions
argument modify the way the bundle is built while the targetPlatform/
selects which deployment target (Windows Standalone,
Android, iOS, etc) the bundle will be used with. Note that bundles built for standalone platforms are not compatible with those built for mobiles and so you may need to produce different versions of a given bundle. See the Asset
Bundle FAQ in the manual for more information about bundle compatibility among platforms.
The return value is of type AssetBundleManifest. This contains a list of all the assets included in the AssetBundle.
Null is returned if any problems occur.
// Create an AssetBundle for Windows.
using UnityEngine;
using UnityEditor; public class BuildAssetBundlesExample : MonoBehaviour
{
[MenuItem( "Example/Build Asset Bundles" )]
static void BuildABs( )
{
// Put the bundles in a folder called "ABs" within the Assets folder.
BuildPipeline.BuildAssetBundles( "Assets/ABs", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows );
}
}
AssetBundleBuild[] builds,BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);
Parameters
outputPath | Output path for the AssetBundles. |
builds | AssetBundle building map. |
assetBundleOptions | AssetBundle building options. |
targetPlatform | Target build platform. |
Returns
AssetBundleManifest The manifest listing all AssetBundles included in this build.
Description
Build AssetBundles from a building map.
This variant of the function lets you specify the names and contents of the bundles using a "build map" rather than with the details set in the editor. The map is simply an array of AssetBundleBuild objects,
each of which contains a bundle name and a list of the names of asset files to be added to the named bundle.
using UnityEngine;
using UnityEditor; public class BuildAssetBundlesBuildMapExample : MonoBehaviour
{
[MenuItem( "Example/Build Asset Bundles Using BuildMap" )]
static void BuildMapABs( )
{
// Create the array of bundle build details.
AssetBundleBuild[] buildMap = new AssetBundleBuild[2]; buildMap[0].assetBundleName = "enemybundle"; string[] enemyAssets = new string[2];
enemyAssets[0] = "Assets/Textures/char_enemy_alienShip.jpg";
enemyAssets[1] = "Assets/Textures/char_enemy_alienShip-damaged.jpg"; buildMap[0].assetNames = enemyAssets;
buildMap[1].assetBundleName = "herobundle"; string[] heroAssets = new string[1];
heroAssets[0] = "char_hero_beanMan";
buildMap[1].assetNames = heroAssets; BuildPipeline.BuildAssetBundles( "Assets/ABs", buildMap, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows );
}
}
unity5.5打包的更多相关文章
- Unity5 AssetBundle 打包以及加载
using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEditor; us ...
- [原]unity5 AssetBundle打包
本文unity版本5.1.3 一.现有的打包教程: 1.http://liweizhaolili.blog.163.com/blog/static/16230744201541410275298/ 阿 ...
- Unity5 AssetBundle打包加载及服务器加载
Assetbundle为资源包不是资源 打包1:通过脚本指定打包 AssetBundleBuild ab = new AssetBundleBuild ...
- Unity5.6打包问题
将unity切换到5.6版本后打Android包时,提示android sdk tools version低于compile version,于是更新了android-sdk(下载了Android-S ...
- Unity5.X 新版AssetBundle打包控制
一.什么是AssetBundle 估计很多人只知道Unity的模型之类的东西可以导出成一种叫做AssetBundle的文件,然后打包后可以在Unity程序运行的时候再加载出来用.那么AssetBund ...
- 再详细的介绍一下Unity5的AssetBundle
之前曾经写了一篇博客介绍Unity5的AssetBundle,结果似乎很受关注.不过似乎很多人看了之后都不懂,主要是因为不太明白AssetBundle是什么,它的依赖关系和结构是什么的,就直接想拿代码 ...
- NGUI在5.3打包失败问题
一.NGUI版本 NGUI是很好用的Unity UI插件. 当前使用版本NGUI Next-Gen UI v3.9.7 (Feb 10, 2016)和NGUI Next-Gen UI 3.9.0两个版 ...
- unity5 manifest
https://www.cnblogs.com/lancidie/p/5878789.html 之前曾经写了一篇博客介绍Unity5的AssetBundle,结果似乎很受关注.不过似乎很多人看了之后都 ...
- 【Unity游戏开发】AssetBundle杂记--AssetBundle的二三事
一.简介 马三在公司大部分时间做的都是游戏业务逻辑和编辑器工具等相关工作,因此对Unity AssetBundle这块的知识点并不是很熟悉,自己也是有打算想了解并熟悉一下AssetBundle,掌握一 ...
随机推荐
- 3款Linux网络监视工具
1 iftop: 如果你想看到现在你的带宽到底是哪些应用在使用,并且各个应用占据了多少带宽的时候,可以用iftop显示出来.使用的参数如下: -h display t ...
- Drupal 安装过程
php.ini 文件 https://drupal.stackexchange.com/questions/164172/problem-installing-in-local-the-transla ...
- Mongo 分组后排序取时间最大的一整条数据对象
db.getCollection('product_protocol_new').aggregate([ {$sort:{"end_date":-1}}, {$group:{ _i ...
- API的理解和使用——哈希类型的命令
哈希常用的命令复习 命令 功能 hset key field value 设置哈希值 hsetnx 设置哈希值,field或键必须不存在 hget 获取某个file对应的值 hdel 删除一个或多个f ...
- JS继承的实现方式
JS作为面向对象的弱类型语言,继承也是其非常强大的特性之一.那么如何在JS中实现继承呢?让我们拭目以待. JS继承的实现方式 既然要实现继承,那么首先我们得有一个父类,代码如下: // 定义一个动物类 ...
- BZOJ 1232 [Usaco2008Nov]安慰奶牛cheer:最小生成树【树上dfs性质】
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1232 题意: 给你一个无向图,n个点,m条边. 每条边有边权len[i][j],每个点有点 ...
- html5--2.6新的布局元素(5)-nav
html5--2.6新的布局元素(4)-aside/nav 学习要点 了解aside/nav元素的语义和用法 通过实例理解aside/nav元素的用法 aside元素 aside元素通常用来设置侧边栏 ...
- 利用Python+阿里云实现DDNS(动态域名解析)
引子我想大家应该都很熟悉DNS了,这回在DNS前面加了一个D又变成了什么呢?这个D就是Dynamic(动态),也就是说,按照传统,一个域名所对应的IP地址应该是定死的,而使用了DDNS后,域名所对应的 ...
- [原创]Java在线编辑word文档调用PageOffice实现并发控制
1.功能介绍 PageOffice的并发控制功能用来解决多个用户在线编辑同一篇文档可能造成的互相覆盖修改结果的技术难题. B/S架构下用户访问都是并发的,也就是说经常会出现同时N个用户对一个服务器页面 ...
- Java企业微信开发_10_未验证域名归属,JS-SDK功能受限
1.现象: 在企业微信后台填写可信域名后,提示:未验证域名归属,JS-SDK功能受限,如下图: 点击“申请域名校验”后, 注意:域名根目录 当时一直不清楚这个域名根目录在哪里,最后让我给试出来了 2. ...