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