using UnityEngine;
using UnityEditor;
using System.Collections;
public class Export{
[MenuItem("Assets/将资源导出成.unity3d文件")]
static void ExportToUnity3d(){
if(Selection.objects.Length>0)
{
string path=EditorUtility.SaveFilePanel("导出资源",null,null,"unity3d");
if(path.Length!=0)BuildPipeline.BuildAssetBundle(Selection.activeObject,Selection.objects,path);
}
else{Debug.Log("请选择要导出的资源或者资源文件夹!");}
}
}
如何将资源打包成.unity3d文件
最新推荐文章于 2024-06-20 15:43:34 发布