25 lines
1.0 KiB
C#
25 lines
1.0 KiB
C#
using UnityEditor;
|
|
using UnityEditor.SceneManagement;
|
|
using UnityEngine;
|
|
|
|
namespace AIGame.Review.Editor
|
|
{
|
|
public static class CharacterAnimationLabMenu
|
|
{
|
|
[MenuItem("Tools/Characters/Open LmGirl Animation Comparison")]
|
|
public static void OpenLmGirl()
|
|
{
|
|
if (EditorApplication.isPlaying) { Debug.LogWarning("请先结束播放,再打开动画对比场景。"); return; }
|
|
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
|
EditorSceneManager.OpenScene("Assets/Review/CharacterAnimationLab/LmGirl/LmGirlAnimationLab.unity");
|
|
}
|
|
[MenuItem("Tools/Characters/Open Animation Comparison")]
|
|
public static void Open()
|
|
{
|
|
if (EditorApplication.isPlaying) { Debug.LogWarning("请先结束播放,再打开动画对比场景。"); return; }
|
|
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
|
EditorSceneManager.OpenScene("Assets/Review/CharacterAnimationLab/CharacterAnimationLab.unity");
|
|
}
|
|
}
|
|
}
|