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: