설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TilePaletteActiveTargetsButton.cs 823B

1234567891011121314151617181920212223242526
  1. using UnityEditor.Toolbars;
  2. using UnityEngine.UIElements;
  3. namespace UnityEditor.Tilemaps
  4. {
  5. [EditorToolbarElement(k_ToolbarId)]
  6. internal class TilePaletteActiveTargetsButton : EditorToolbarDropdown
  7. {
  8. internal const string k_ToolbarId = "Tile Palette/Active Targets Button";
  9. private const string k_IconPath = "Packages/com.unity.2d.tilemap/Editor/Icons/Tilemap.ActiveTargetLayers.png";
  10. public TilePaletteActiveTargetsButton()
  11. {
  12. TilePaletteOverlayUtility.SetStyleSheet(this);
  13. icon = EditorGUIUtility.LoadIcon(k_IconPath);
  14. clicked += OnClicked;
  15. }
  16. private void OnClicked()
  17. {
  18. IGenericMenu menu = new TilePaletteActiveTargetsDropdownMenu();
  19. menu.DropDown(worldBound, this, true);
  20. }
  21. }
  22. }