public void SaveSettings(bool hotkeysWereChanged) { EditorPrefs.SetString("EditorFullscreenWindowSettings_VER", SettingsSaveVersion); EditorPrefs.SetString("EditorFullscreenWindowSettings_ALL", SerializerUtility.Serialize(this)); if (hotkeysWereChanged) { this.UpdateMenuItems(); } }
internal static void SaveFullscreenState() { try { fullscreenState.CleanDeletedWindows(); //Update state window container positions and focus before saving foreach (var state in fullscreenState.window) { if (state.EditorWin != null) { state.ContainerPosition = state.EditorWin.GetContainerPosition(); state.HasFocus = state.EditorWin == EditorWindow.focusedWindow; } } string fullscreenStateData = SerializerUtility.Serialize(fullscreenState); File.WriteAllText(Path.Combine(projectLibraryPath, FullscreenStateFilename), fullscreenStateData); } catch (IOException e) { Debug.LogException(e); } }