public GraphBuilder NewNode(Type nodeType, Vector2 position, string name, BaseGraphCLIAttributes attributes = null)
 {
     if (!nodeType.IsSubclassOf(typeof(BaseNode)))
     {
         Debug.Log("[GraphBuilder] unknown node type: '" + nodeType + "'");
         return(this);
     }
     commands.Add(BaseGraphCLI.GenerateNewNodeCommand(nodeType, name, position, attributes));
     return(this);
 }
 public GraphBuilder Link(string fromNode, string fromAnchor, string toNode, string toAnchor)
 {
     commands.Add(BaseGraphCLI.GenerateLinkAnchorNameCommand(fromNode, fromAnchor, toNode, toAnchor));
     return(this);
 }
 public GraphBuilder Link(string from, string to)
 {
     commands.Add(BaseGraphCLI.GenerateLinkCommand(from, to));
     return(this);
 }
 public GraphBuilder NewNode <T>(string name, BaseGraphCLIAttributes attributes = null) where T : BaseNode
 {
     commands.Add(BaseGraphCLI.GenerateNewNodeCommand(typeof(T), name, attributes));
     return(this);
 }
 public GraphBuilder Link(string fromNode, int fromAnchorIndex, string toNode, int toAnchorIndex)
 {
     commands.Add(BaseGraphCLI.GenerateLinkAnchorCommand(fromNode, fromAnchorIndex, toNode, toAnchorIndex));
     return(this);
 }
 public void Execute(string command)
 {
     BaseGraphCLI.Execute(this, command);
 }
 //wipeDatas will remove all the graph content before importing the file
 public void Import(string filePath, bool wipeDatas = false)
 {
     BaseGraphCLI.Import(this, filePath, wipeDatas);
 }
 //export the graph as commands in a file and return the created file path
 public void Export(string filePath)
 {
     BaseGraphCLI.Export(this, filePath);
 }