using UnityEditor.EditorTools; using UnityEngine; namespace UnityEditor.Tilemaps { /// /// Tool for doing a box fill with the Tile Palette /// //[EditorTool("Box Tool", typeof(GridLayout))] public sealed class BoxTool : TilemapEditorTool { private static class Styles { public static string tooltipStringFormat = "|Paint a filled box with active brush ({0})"; public static string shortcutId = "Grid Painting/Rectangle"; public static GUIContent toolContent = EditorGUIUtility.IconContent("Grid.BoxTool", GetTooltipText(tooltipStringFormat, shortcutId)); } /// /// Tooltip String Format for the BoxTool /// protected override string tooltipStringFormat { get { return Styles.tooltipStringFormat; } } /// /// Shortcut Id for the BoxTool /// protected override string shortcutId { get { return Styles.shortcutId; } } /// /// Toolbar Icon for the BoxTool /// public override GUIContent toolbarIcon { get { return Styles.toolContent; } } } }