예제 #1
0
 public void SaveSettings(bool hotkeysWereChanged)
 {
     EditorPrefs.SetString("EditorFullscreenWindowSettings_VER", SettingsSaveVersion);
     EditorPrefs.SetString("EditorFullscreenWindowSettings_ALL", SerializerUtility.Serialize(this));
     if (hotkeysWereChanged)
     {
         this.UpdateMenuItems();
     }
 }
예제 #2
0
        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);
            }
        }