ScreenOrientationEditorSettings.cs 521 B

12345678910111213141516
  1. namespace AppUI
  2. {
  3. /// <summary>编辑器下 Game 视图 1170×2532 / 2532×1170 自动切换开关(EditorPrefs)。</summary>
  4. public static class ScreenOrientationEditorSettings
  5. {
  6. public const string EditorPrefsKey = "SmartBow.EditorAutoGameViewOrientation";
  7. #if UNITY_EDITOR
  8. public static bool IsEnabled
  9. {
  10. get => UnityEditor.EditorPrefs.GetBool(EditorPrefsKey, true);
  11. set => UnityEditor.EditorPrefs.SetBool(EditorPrefsKey, value);
  12. }
  13. #endif
  14. }
  15. }