summaryrefslogtreecommitdiff
path: root/Assets/Editor/Tools/ShortcutHelper.cs
blob: 33cf29c5b305f797e9331b5cb4d678b1c99ee437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;

public class ShortcutHelper
{
    [MenuItem("Erika/Scene/打开Saionji场景")]
    static void OpenSaionjiScene()
    {
        string path = Application.dataPath + "/Scenes/Demo/FightDemoScene.unity";
        if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
        {
            return;
        }
        EditorSceneManager.OpenScene(path);
    }

    [MenuItem("Erika/Scene/打开UMotion场景")]
    static void OpenUMotionScene()
    {
        string path = Application.dataPath + "/Scenes/Demo/AnimationEditScene.unity";
        if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
        {
            return;
        }
        EditorSceneManager.OpenScene(path);
    }

}