您的位置:首页 > 移动开发 > Unity3D

如何将资源打包成.unity3d文件

2013-10-05 16:40 267 查看
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