From de3c1b48dadcddc3906a47f5641ea8294992d1eb Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 21 Sep 2022 15:25:59 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=81=AE=E6=B6=88=E3=81=97=E5=BF=98=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM10/Editor/MigrationMenu.cs | 56 ----------------------- Assets/VRM10/Editor/MigrationMenu.cs.meta | 11 ----- 2 files changed, 67 deletions(-) delete mode 100644 Assets/VRM10/Editor/MigrationMenu.cs delete mode 100644 Assets/VRM10/Editor/MigrationMenu.cs.meta diff --git a/Assets/VRM10/Editor/MigrationMenu.cs b/Assets/VRM10/Editor/MigrationMenu.cs deleted file mode 100644 index d497f79a8..000000000 --- a/Assets/VRM10/Editor/MigrationMenu.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.IO; -using UnityEditor; -using UnityEngine; - -namespace UniVRM10 -{ - public static class MigrationMenu - { - static VRMShaders.PathObject s_lastPath = VRMShaders.PathObject.UnityAssets; - - const string CONTEXT_MENU = "Assets/Migration: Vrm1"; - - [MenuItem(CONTEXT_MENU, true)] - static bool Enable() - { - if (!VRMShaders.PathObject.TryGetFromAsset(Selection.activeObject, out VRMShaders.PathObject path)) - { - return false; - } - var isVrm = path.Extension.ToLower() == ".vrm"; - return isVrm; - } - - [MenuItem(CONTEXT_MENU, false)] - static void Exec() - { - if (!VRMShaders.PathObject.TryGetFromAsset(Selection.activeObject, out VRMShaders.PathObject path)) - { - return; - } - - // migrate - var vrm1Bytes = MigrationVrm.Migrate(path.ReadAllBytes()); - - if (!s_lastPath.TrySaveDialog("Save vrm1 file", $"{path.Stem}_vrm1", out VRMShaders.PathObject dst)) - { - return; - } - s_lastPath = dst.Parent; - - // write result - dst.WriteAllBytes(vrm1Bytes); - - if (dst.IsUnderAsset) - { - // immediately import for GUI update - Debug.Log($"import: {dst}"); - dst.ImportAsset(); - } - else - { - Debug.Log($"write: {dst}"); - } - } - } -} diff --git a/Assets/VRM10/Editor/MigrationMenu.cs.meta b/Assets/VRM10/Editor/MigrationMenu.cs.meta deleted file mode 100644 index cc4e4ebc9..000000000 --- a/Assets/VRM10/Editor/MigrationMenu.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c0be718f3aba6ad4282a4b74eae9045b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: