// Replaces LastProjectPaths in window layouts used in tutorials so that e.g. // pre-saved Project window states work correctly. internal static void PrepareWindowLayouts() { AssetDatabase.FindAssets($"t:{typeof(TutorialContainer).FullName}") .Select(guid => AssetDatabase.LoadAssetAtPath <TutorialContainer>(AssetDatabase.GUIDToAssetPath(guid)).ProjectLayoutPath ) .Concat( AssetDatabase.FindAssets($"t:{typeof(Tutorial).FullName}") .Select(guid => AssetDatabase.LoadAssetAtPath <Tutorial>(AssetDatabase.GUIDToAssetPath(guid)).WindowLayoutPath ) ) .Where(StringExt.IsNotNullOrEmpty) .Distinct() .ToList() .ForEach(layoutPath => TutorialManager.PrepareWindowLayout(layoutPath)); }
/// <summary> /// Loads the tutorial project layout /// </summary> public void LoadTutorialProjectLayout() { TutorialManager.LoadWindowLayoutWorkingCopy(ProjectLayoutPath); }