// 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();
    }
Exemple #2
0
        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")));
        }
Exemple #3
0
 public static void ExportUnityPackage()
 {
     UnityPackageExporter.Export();
 }
Exemple #4
0
 public void ExportTest()
 {
     UnityPackageExporter.Export();
 }
Exemple #5
0
        public void ExportVersionTest()
        {
            var path = UnityPackageExporter.ExportVersion("Temp/test");

            Assert.False(path.Equals(""));
        }
Exemple #6
0
        public void ExportPackageTest()
        {
            var path = UnityPackageExporter.ExportPackage("Temp/test", new[] { "Assets/UniTool.Sample/UnitoolSampleScene.unity" });

            Assert.False(path.Equals(""));
        }
Exemple #7
0
        public void GetExportPathTest()
        {
            var exportPath = UnityPackageExporter.GetExportPath();

            Assert.AreEqual("Dist/UniTool.unitypackage", exportPath);
        }