module-navigation-tool/Editor/Toolbar/Tools/Settings/ToolbarPlayerPrefsSettings.cs
Anders Ejlersen fe82c5c9fa 1.8.0: Added target frame rate and PlayerPrefs.Delete to toolbar
- Added: Tooltips on all buttons and labels in toolbar tools
- Added: Target frame rate with `[min;max]` slider in toolbar
- Added: `PlayerPrefs` delete button added to toolbar
- Added: Option to select Single/Additive scene load/unload to scene picker
- Added: All `IToolbarSettings` will be grouped with a foldout-toggle in Preferences
2022-12-07 22:10:09 +01:00

26 lines
749 B
C#

using UnityEditor;
namespace Module.NavigationTool.Editor.Toolbar
{
internal sealed class ToolbarPlayerPrefsSettings : IToolbarSettings
{
public string Title => "Player Prefs";
private const string PREF_PLAYER_PREFS_ENABLED = "ToolbarSettings.IsPlayerPrefsEnabled";
public static bool IsPlayerPrefsEnabled
{
get => EditorPrefs.GetBool(PREF_PLAYER_PREFS_ENABLED, false);
set => EditorPrefs.SetBool(PREF_PLAYER_PREFS_ENABLED, value);
}
public void Initialize()
{
}
public void Draw()
{
IsPlayerPrefsEnabled = EditorGUILayout.Toggle("Enable Player Prefs", IsPlayerPrefsEnabled);
}
}
}