PinnedElement.cs 547 B

123456789101112131415161718192021222324
  1. using UnityEngine.UIElements;
  2. using UnityEngine;
  3. using System;
  4. namespace GraphProcessor
  5. {
  6. /// <summary>
  7. /// Element that overlays the graph like the blackboard
  8. /// </summary>
  9. [System.Serializable]
  10. public class PinnedElement
  11. {
  12. public static readonly Vector2 defaultSize = new Vector2(150, 200);
  13. public Rect position = new Rect(Vector2.zero, defaultSize);
  14. public bool opened = true;
  15. public SerializableType editorType;
  16. public PinnedElement(Type editorType)
  17. {
  18. this.editorType = new SerializableType(editorType);
  19. }
  20. }
  21. }