public override void OnBodyGUI() { if (node == null) { node = target as MovesetAttackNode; } serializedObject.Update(); NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("lastNode")); NodeEditorGUILayout.PropertyField(serializedObject.FindProperty("attackDefinition")); executeList.DoLayoutList(); inputSequence.DoLayoutList(); // Draw GUI NodeEditorGUILayout.DynamicPortList( "nextNode", // field name typeof(nextNodeDefinition), // field type serializedObject, // serializable object NodePort.IO.Output); // onCreate override. This is where the magic happens. serializedObject.ApplyModifiedProperties(); }
public override void OnCreateConnection(NodePort from, NodePort to) { base.OnCreateConnection(from, to); if (from.node == this) { nextNode[(int)from.GetOutputValue()].node = (MovesetAttackNode)to.node; } if (to.node == this) { lastNode = (MovesetAttackNode)from.node; } }