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打包的主要内容,如果未能解决你的问题,请参考以下文章