首页 > 编程语言 > 详细

unity学习 5.x打包

时间:2017-04-23 22:04:38      阅读:203      评论:0      收藏:0      [点我收藏+]

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打包

原文:http://www.cnblogs.com/gasolhome/p/6754104.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!