Skip to content

Commit b32099f

Browse files
committed
Added exporting function
1 parent 682f10c commit b32099f

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

Assets/Editor.meta

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Editor/ExportUFXPackage.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using UnityEngine;
5+
using UnityEditor;
6+
7+
public class ExportUFXPackage : MonoBehaviour {
8+
9+
// Add a menu item named "Do Something" to MyMenu in the menu bar.
10+
[MenuItem("UXF/Export package")]
11+
static void ExportPackage()
12+
{
13+
string[] assets = new string[]
14+
{
15+
"Assets/Plugins",
16+
"Assets/StreamingAssets",
17+
"Assets/UXF"
18+
};
19+
20+
21+
22+
if (!Directory.Exists("Package"))
23+
Directory.CreateDirectory("Package");
24+
string path = "Package/UXF.unitypackage";
25+
26+
27+
ExportPackageOptions options = ExportPackageOptions.Recurse;
28+
29+
AssetDatabase.ExportPackage(assets, path, options);
30+
}
31+
}

Assets/Editor/ExportUFXPackage.cs.meta

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)