暫無描述
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.

TilePaletteClipboardViewElement.cs 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using UnityEngine;
  2. using UnityEngine.UIElements;
  3. namespace UnityEditor.Tilemaps
  4. {
  5. [UxmlElement]
  6. public partial class TilePaletteClipboardViewElement : VisualElement
  7. {
  8. private static readonly string ussClassName = "unity-tilepalette-clipboard-view-element";
  9. private static readonly string k_Name = L10n.Tr("Tile Palette Clipboard View Element");
  10. public TilePaletteClipboardViewElement()
  11. {
  12. AddToClassList(ussClassName);
  13. name = k_Name;
  14. TilePaletteOverlayUtility.SetStyleSheet(this);
  15. }
  16. private void OnAttachedToPanel(AttachToPanelEvent evt)
  17. {
  18. GridPaintingState.beforePaletteChanged += BeforePaletteChanged;
  19. GridPaintingState.paletteChanged += PaletteChanged;
  20. }
  21. private void OnDetachFromPanel(DetachFromPanelEvent evt)
  22. {
  23. GridPaintingState.beforePaletteChanged -= BeforePaletteChanged;
  24. GridPaintingState.paletteChanged -= PaletteChanged;
  25. }
  26. private void BeforePaletteChanged()
  27. {
  28. }
  29. private void PaletteChanged(GameObject palette)
  30. {
  31. }
  32. }
  33. }