示例#1
0
 void OnGUI()
 {
     // The actual window code goes here
     if (SendEventNormalizedNodeEditorWindow.node != null)
     {
         if (editor == null)
         {
             editor = NodeEditor.CreateEditor(SendEventNormalizedNodeEditorWindow.node.GetType());
         }
         if (editor.target != SendEventNormalizedNodeEditorWindow.node)                                                //How to add target to editor??? or subclass the Node Editor
         {
             editor.DrawNode(SendEventNormalizedNodeEditorWindow.node);
         }
         else
         {
             editor.OnInspectorGUI();
         }
     }
 }
示例#2
0
 void OnGUI()
 {
     // The actual window code goes here
     if (NodePopupEditor <T> .node != null)
     {
         if (editor == null)
         {
             editor = NodeEditor.CreateEditor(NodePopupEditor <T> .node.GetType());
         }
         if (editor.target != NodePopupEditor <T> .node)                                              //How to add target to editor??? or subclass the Node Editor
         {
             editor.DrawNode(NodePopupEditor <T> .node);
         }
         else
         {
             editor.OnInspectorGUI();
         }
     }
 }