How to create links at runtime

Jun 2, 2014 at 10:41 AM
Edited Jun 2, 2014 at 10:41 AM
Really a good work! But I was not able to create links at runtime until I changed FlowGraphView.cs as below
private void AddLink(FlowGraphConnector leftConnector, FlowGraphConnector rightConnector)
to
 public void AddLink(FlowGraphConnector leftConnector, FlowGraphConnector rightConnector)
Is this correct? Or there is something else I don't understand?

Thx
Coordinator
Dec 6, 2014 at 9:38 AM
Yes, davideerbisti, you have done this right. I am going to introduce this fix in the next version. As for now it can be done this way:
var rightConnector = rightNode.InputConnectors[i];

var leftConnector = leftNode.OutputConnectors[j];

flowGraphView.Model.Links.Add(new FlowGraphLink(leftConnector, rightConnector));
Dec 6, 2014 at 9:57 AM
Good news! Waiting for the next version I would thank you all for this work.