SwitchNodeView.cs 533 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEditor;
  5. using UnityEditor.UIElements;
  6. using UnityEditor.Experimental.GraphView;
  7. using UnityEngine.UIElements;
  8. using GraphProcessor;
  9. [NodeCustomEditor(typeof(SwitchNode))]
  10. public class SwitchNodeView : BaseNodeView
  11. {
  12. public override void Enable()
  13. {
  14. var node = nodeTarget as SwitchNode;
  15. // Create your fields using node's variables and add them to the controlsContainer
  16. controlsContainer.Add(new Label("Hello World !"));
  17. }
  18. }