Navigation tools upgraded to use the new MainToolbarElement API
This commit is contained in:
parent
708b99f763
commit
3e1602162c
52 changed files with 837 additions and 66 deletions
|
|
@ -5,15 +5,24 @@ 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";
|
||||
|
||||
#if !UNITY_6000_3_OR_NEWER
|
||||
private const string PREF_IS_BUILD_ENABLED = "ToolbarSettings.IsBuildEnabled";
|
||||
#endif
|
||||
|
||||
private const string PREF_IS_BUILD_AND_RUN_ENABLED = "ToolbarSettings.IsBuildAndRunEnabled";
|
||||
|
||||
#if UNITY_6000_3_OR_NEWER
|
||||
public bool EnableDraw => false;
|
||||
#endif
|
||||
|
||||
#if !UNITY_6000_3_OR_NEWER
|
||||
public static bool IsBuildEnabled
|
||||
{
|
||||
get => EditorPrefs.GetBool(PREF_IS_BUILD_ENABLED, false);
|
||||
set => EditorPrefs.SetBool(PREF_IS_BUILD_ENABLED, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
public static bool IsBuildAndRunEnabled
|
||||
{
|
||||
|
|
@ -27,7 +36,9 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
|
||||
public void Draw()
|
||||
{
|
||||
#if !UNITY_6000_3_OR_NEWER
|
||||
IsBuildEnabled = EditorGUILayout.Toggle("Enable Build Target", IsBuildEnabled);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue