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,掌握一 ...
随机推荐
- CF A. DZY Loves Hash
A. DZY Loves Hash time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- 同源策略 , CORS
一 . 同源策略 同源策略( Same origin policy ) 是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,则浏览器的正常功能可能都会受到影响,可以说Web是构建在同源 ...
- jQuery的事件绑定和解除
1 . 绑定事件 语法 : bind(type,data,fn) 描述 : 为每一个匹配的特定元素(像 click)绑定一个事件处理器函数. type(String) : 事件类型 data(Obje ...
- wamp server 安装后 Apache80端口占用
提示:Your port 80 is actually used by :Server: Microsoft-HTTPAPI/2.0 解决方案:计算机->右键管理->服务和应用程序-> ...
- SDUT OJ I样(0-1背包问题 【模板】)
I样 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 这是个什么问题呢?DP,贪心,数据结构,图论,数论还是计算几何?管他呢,反正 ...
- hihocoder #1040 矩形判断(计算几何问题 给8个点的坐标,能否成为一个矩形 【模板思路】)
#1040 : 矩形判断 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 给出平面上4条线段,判断这4条线段是否恰好围成一个面积大于0的矩形. 输入 输入第一行是一个整数T ...
- js的内部类
JavaScript中本身提供一些,可以直接使用的类,这种类就是内部类.主要有: Object/Array/Math/Boolean/String/RegExp/Date/Number共8个内部类. ...
- elasticsearch _source字段的一些说明
_source field The _source field contains the original JSON document body that was passed at index ti ...
- 【LeetCode】Maximum Product Subarray 求连续子数组使其乘积最大
Add Date 2014-09-23 Maximum Product Subarray Find the contiguous subarray within an array (containin ...
- css实现下拉列表
像上面的要想实现 Hover 标题时 内容区下拉的效果,一般是要用js实现: 先获取内容区的高度,由于内容区刚开始可能是隐藏的,那么怎么才能获取其高度呢?方法是先给其元素设置绝对定位并把位置保持和之 ...