namespace Unity.Tutorials.Core.Editor { /// /// Wrapper class for TutorialWindow public APIs /// public static class TutorialWindowUtils { /// /// The currently active tutorial, if any. /// public static Tutorial CurrentTutorial => TutorialWindow.Instance.CurrentTutorial; /// /// Are we currently (during this frame) transitioning from one tutorial to another? /// /// /// This transition typically happens when using a Switch Tutorial button on a tutorial page. /// public static bool IsTransitioningBetweenTutorials => TutorialWindow.Instance.IsTransitioningBetweenTutorials; /// /// Are we currently loading a window layout. /// /// /// A window layout load typically happens when the project is started for the first time /// and the project's startup settings specify a window layout for the project, or when entering /// or exiting a tutorial with a window layout specified. /// public static bool IsLoadingLayout => TutorialWindow.s_IsLoadingLayout; /// /// Starts a tutorial. /// /// The tutorial to be started. /// /// The caller of the funtion is responsible for positioning the TutorialWindow for the tutorials. /// If no TutorialWindow is visible, it is created and shown as a free-floating window. /// If the currently active scene has unsaved changes, the user is asked to save them. /// If we are in Play Mode, it is exited. /// Note that currently there is no explicit way to quit a tutorial. Instead, a tutorial should be quit either /// by user interaction or by closing the TutorialWindow programmatically. /// public static void StartTutorial(Tutorial tutorial) { TutorialWindow.StartTutorial(tutorial); } /// /// Clear localization table cache /// public static void ClearLocalizationCache() { TutorialWindow.ClearLocalizationCache(); } } }