summaryrefslogtreecommitdiff
path: root/Assets/Editor/Tools/ShortcutHelper.cs
blob: d0173d235ebc31998c4001e21cd3d6cf60f11822 (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
32
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;

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

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


}