public override void OnClick(Node source, Vector2 mousePosition) { MultiANDNode node = source as MultiANDNode; NodeEditorUtility.AddNewNode(graph.editorData, null, null, mousePositionOnCanvas, (ConditionNode n) => { n.Condition.AddBlockRange(BlockUtility.GetConditionBlockFromNode(source)); n.editorRect = node.editorRect; RefactorUtility.RetargetNode(node, n); }); NodeEditorUtility.RemoveNode(graph.editorData, node); graph.Refresh(); }
public override void OnInspectorGUI() { MultiANDNode node = target as MultiANDNode; DrawDefaultInspector(); VariableEditorUtility.DrawMembers(new GUIContent("Targets"), node.targets, node, new FilterAttribute(typeof(bool)), (obj) => { node.targets = obj; }, () => { uNodeEditorUtility.RegisterUndo(node); node.targets.Add(new MemberData(true)); }); }