using UnityEditor; using UnityEngine; namespace Unity.Tutorials.Core.Editor { /// /// Contains the names for the menu items used by the In-Editor Tutorials packages. /// public static class MenuItems { /// /// Name of the main menu used by the package. /// public const string Menu = "Tutorials"; /// /// Path for menu. Append menu item names to this string. /// public const string MenuPath = Menu + "/"; /// /// The default menu item for showing the tutorials in the project. /// public const string ShowTutorials = "Show Tutorials"; /// /// Menu path for the authoring submenu. /// public const string AuthoringMenuPath = Menu + "/Authoring/"; [MenuItem(MenuPath + "Welcome Dialog")] static void OpenWelcomeDialog() { var welcomePage = TutorialProjectSettings.Instance.WelcomePage; if (welcomePage != null) TutorialModalWindow.Show(welcomePage); else Debug.LogError("No TutorialProjectSettings.WelcomePage set."); } [MenuItem(MenuPath + ShowTutorials)] static void OpenTutorialWindow() { UserStartupCode.ShowTutorialWindow(); } } }