From f5833bb16590d6c83d082b31d3c3cf12800390a1 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 6 Aug 2021 15:17:12 +0900 Subject: [PATCH] =?UTF-8?q?VRM-1.0=20=E3=81=AE=20unitypackage=20=E3=82=82?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM/Editor/VRMExportUnityPackage.cs | 48 ++++++++-------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/Assets/VRM/Editor/VRMExportUnityPackage.cs b/Assets/VRM/Editor/VRMExportUnityPackage.cs index 96372735cc..a1061eb99d 100644 --- a/Assets/VRM/Editor/VRMExportUnityPackage.cs +++ b/Assets/VRM/Editor/VRMExportUnityPackage.cs @@ -24,13 +24,6 @@ public static bool EndsWithAndMeta(this string str, string terminator) public static class VRMExportUnityPackage { - const string DATE_FORMAT = "yyyyMMdd"; - - static string GetDesktop() - { - return Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/VRM"; - } - static string GetProjectRoot() { return Path.GetFullPath(Application.dataPath + "/.."); @@ -141,26 +134,6 @@ static void CreateUnityPackageWithoutBuild() CreateUnityPackages(folder); } - public static void CreateUnityPackageWithBuild() - { - var folder = GetProjectRoot(); - if (!Directory.Exists(folder)) - { - Directory.CreateDirectory(folder); - } - - if (!BuildTestScene()) - { - Debug.LogError("Failed to build test scenes"); - } - CreateUnityPackages(folder); - } - - public static void CreateUnityPackage() - { - CreateUnityPackages(Path.GetFullPath(Path.Combine(Application.dataPath, ".."))); - } - public class GlobList { public readonly string[] Files; @@ -198,21 +171,36 @@ public static void CreateUnityPackages(string outputDir) // UniVRM and sub packages { var packages = new[]{ - new PackageInfo("UniVRM") + new PackageInfo("UniVRM0X") { List = new []{ new GlobList("Assets/VRM"), new GlobList("Assets/VRMShaders"), - new GlobList("Assets/MeshUtility"), new GlobList("Assets/UniGLTF"), } }, - new PackageInfo("UniVRM-samples") + new PackageInfo("UniVRM0X-samples") { List = new[]{ new GlobList("Assets/VRM.Samples"), new GlobList("Assets/StreamingAssets/VRM.Samples"), } + }, + new PackageInfo("UniVRM10") + { + List = new []{ + new GlobList("Assets/VRM10"), + new GlobList("Assets/VRMShaders"), + new GlobList("Assets/UniGLTF"), + } + }, + new PackageInfo("UniVRM10-samples") + { + List = new[]{ + new GlobList("Assets/VRM10.Samples"), + new GlobList("Assets/UniGLTF.Samples"), // look dev resources + new GlobList("Assets/StreamingAssets/VRM.Samples"), + } } }; foreach (var package in packages)