// Windowのクライアント領域のGUI処理を記述 void OnGUI() { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Include Unity Package Root Path"); buildIncludeRootPath = (string)EditorGUILayout.TextField(buildIncludeRootPath); UnityEngine.Object buildIncludeRoot = AssetDatabase.LoadAssetAtPath(buildIncludeRootPath, typeof(UnityEngine.Object)); buildIncludeRoot = EditorGUILayout.ObjectField(buildIncludeRoot, typeof(UnityEngine.Object), false); if (buildIncludeRoot != null) { buildIncludeRootPath = AssetDatabase.GetAssetPath(buildIncludeRoot); } GUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Export Unity Package Path"); exportUnityPackageFilePath = (string)EditorGUILayout.TextField(exportUnityPackageFilePath); GUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(new GUIContent("Export Unity Package"))) { List <string> buildPathes = UnityPackageExporter.FindFilePathes(buildIncludeRootPath); UnityPackageExporter.ExportUnityPackage( buildIncludeRootPathes: buildPathes.ToArray(), exportFilePath: exportUnityPackageFilePath ); System.Diagnostics.Process.Start(UnityPackageExporter.FileRootPath(exportUnityPackageFilePath)); } EditorGUILayout.EndHorizontal(); }
public void GetAssetsTest() { var assets = UnityPackageExporter.GetAssets(); Assert.True(assets.Any(it => it.Equals("Assets/UniTool/EngineEx.meta"))); Assert.True(assets.Any(it => it.Equals("Assets/UniTool/Event.meta"))); Assert.True(assets.Any(it => it.Equals("Assets/UniTool/ObjectEx.meta"))); Assert.True(assets.Any(it => it.Equals("Assets/UniTool/X.meta"))); }
public static void ExportUnityPackage() { UnityPackageExporter.Export(); }
public void ExportTest() { UnityPackageExporter.Export(); }
public void ExportVersionTest() { var path = UnityPackageExporter.ExportVersion("Temp/test"); Assert.False(path.Equals("")); }
public void ExportPackageTest() { var path = UnityPackageExporter.ExportPackage("Temp/test", new[] { "Assets/UniTool.Sample/UnitoolSampleScene.unity" }); Assert.False(path.Equals("")); }
public void GetExportPathTest() { var exportPath = UnityPackageExporter.GetExportPath(); Assert.AreEqual("Dist/UniTool.unitypackage", exportPath); }