- 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
33 lines
1,009 B
C#
33 lines
1,009 B
C#
using UnityEditor;
|
|
|
|
namespace Module.NavigationTool.Editor.Toolbar
|
|
{
|
|
internal sealed class ToolbarBuildSettings : IToolbarSettings
|
|
{
|
|
public string Title => "Build";
|
|
|
|
private const string PREF_IS_BUILD_ENABLED = "ToolbarSettings.IsBuildEnabled";
|
|
private const string PREF_IS_BUILD_AND_RUN_ENABLED = "ToolbarSettings.IsBuildAndRunEnabled";
|
|
|
|
public static bool IsBuildEnabled
|
|
{
|
|
get => EditorPrefs.GetBool(PREF_IS_BUILD_ENABLED, false);
|
|
set => EditorPrefs.SetBool(PREF_IS_BUILD_ENABLED, value);
|
|
}
|
|
|
|
public static bool IsBuildAndRunEnabled
|
|
{
|
|
get => EditorPrefs.GetBool(PREF_IS_BUILD_AND_RUN_ENABLED, true);
|
|
set => EditorPrefs.SetBool(PREF_IS_BUILD_AND_RUN_ENABLED, value);
|
|
}
|
|
|
|
public void Initialize()
|
|
{
|
|
}
|
|
|
|
public void Draw()
|
|
{
|
|
IsBuildEnabled = EditorGUILayout.Toggle("Enable Build Target", IsBuildEnabled);
|
|
}
|
|
}
|
|
} |