unity学习 5.x打包

Posted gasor

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unity学习 5.x打包相关的知识,希望对你有一定的参考价值。

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class buildab {
[MenuItem("Publish/Build Bundle")]
public static void BuildBundle()
{
List<AssetBundleBuild> builds = new List<AssetBundleBuild>();
AssetBundleBuild b = new AssetBundleBuild();
b.assetBundleName = "2000.assetbundle";
b.assetNames = new string[] { "Assets/New Material.mat" };
builds.Add(b);
BuildPipeline.BuildAssetBundles("Assets/Bundle", builds.ToArray(), BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, EditorUserBuildSettings.activeBuildTarget);
}
}

以上是关于unity学习 5.x打包的主要内容,如果未能解决你的问题,请参考以下文章

unity学习 5.x解包

Unity3d 5.x AssetBundle打包与加载

Unity 5.x 导入教学Demo

Unity AB打包步骤(5.X版本)

Unity入门FBX模型和资源打包

unity学习笔记-有关打包到安卓开机黑屏时间过长的心得