UniVRM/Assets/UniGLTF/Editor/TopMenu.cs
ousttrue b216a5bbc0 メニューの表記、順番調整
- `-1.0` => ` 1.0`
- `Import` and `Export`
- `Export < Import < MeshUtility` order
2023-11-15 18:24:02 +09:00

44 lines
1.7 KiB
C#

using UnityEditor;
namespace UniGLTF
{
/// <summary>
/// 機能をどのようにトップメニューに表示するかどうかだけを記述する.
/// </summary>
public static class TopMenu
{
private const string UserGltfMenuPrefix = UniGLTFVersion.MENU;
private const string DevelopmentMenuPrefix = UniGLTFVersion.MENU + "/Development";
[MenuItem(UserGltfMenuPrefix + "/Version: " + UniGLTFVersion.UNIGLTF_VERSION, validate = true)]
private static bool ShowVersionValidation() => false;
[MenuItem(UserGltfMenuPrefix + "/Version: " + UniGLTFVersion.UNIGLTF_VERSION, priority = 0)]
private static void ShowVersion() { }
[MenuItem(UserGltfMenuPrefix + "/" + GltfExportWindow.MENU_NAME, priority = 1)]
private static void ExportGameObjectToGltf() => GltfExportWindow.ExportGameObjectToGltfFile();
[MenuItem(UserGltfMenuPrefix + "/" + GltfImportMenu.MENU_NAME, priority = 2)]
private static void ImportGltfFile() => GltfImportMenu.ImportGltfFileToGameObject();
[MenuItem(UserGltfMenuPrefix + "/" + MeshUtility.MeshUtilityDialog.MENU_NAME, priority = 3)]
private static void OpenMeshProcessingWindow() => MeshUtility.MeshUtilityDialog.OpenWindow();
#if VRM_DEVELOP
[MenuItem(DevelopmentMenuPrefix + "/Generate Serialization Code", priority = 40)]
private static void GenerateSerializationCode()
{
SerializerGenerator.GenerateSerializer();
DeserializerGenerator.GenerateSerializer();
}
[MenuItem(DevelopmentMenuPrefix + "/Generate UniJSON ConcreteCast", priority = 41)]
private static void GenerateUniJsonConcreteCastCode() => UniJSON.ConcreteCast.GenerateGenericCast();
#endif
}
}