using UnityEditor; namespace Module.NavigationTool.Editor.Toolbar { internal sealed class ToolbarBuildSettings : IToolbarSettings { public string Title => "Build"; #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 { 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() { #if !UNITY_6000_3_OR_NEWER IsBuildEnabled = EditorGUILayout.Toggle("Enable Build Target", IsBuildEnabled); #endif } } }