using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class Export : MonoBehaviour
{
[MenuItem("Assets/ResourceExportWindows/BuildBundle")]
public static void BuildBundleWindows()
{
BuildBundle(BuildTarget.StandaloneWindows);
}
static void BuildBundle(BuildTarget buildTarget)
{
Object obj = Selection.activeObject;
if (null != obj)
{
string path = AssetDatabase.GetAssetPath(obj);
string savePath = EditorUtility.SaveFilePanel("please select an prefab", "", obj.name, "bundle");
if (null != savePath)
{
AssetBundleBuild[] buildBuild = new AssetBundleBuild[1];
buildBuild[0] = new Ass
Unity2022打包AssetBundle
于 2022-08-09 17:24:20 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)