public static bool Exit() { if (!isEditorMode) { return(true); } ushort result = (ushort)EditorUtility.DisplayDialogComplex("退出技能编辑器", "是否保存当前动作的更改", Button[Save], Button[Cancel], Button[NotSave]); if (result == Cancel) { return(false); } if (result == Save) { Controller.WriteAnimClipData(); } AnimatorControllerManager.RevertAnimatorControllerFile(); Controller.Exit(); ModelManager.Refresh(); EditorApplication.wantsToQuit -= Exit; EditorSceneManager.OpenScene(Config.ExitScenePath); EditorApplication.ExecuteMenuItem(Config.ExitLayoutMenuPath); return(true); }