Example #1
0
 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);
 }
Example #2
0
 public PWGraphBuilder Link(string fromNode, int fromAnchorIndex, string toNode, int toAnchorIndex)
 {
     commands.Add(PWGraphCLI.GenerateLinkAnchorCommand(fromNode, fromAnchorIndex, toNode, toAnchorIndex));
     return(this);
 }
Example #3
0
 public PWGraphBuilder Link(string fromNode, string fromAnchor, string toNode, string toAnchor)
 {
     commands.Add(PWGraphCLI.GenerateLinkAnchorNameCommand(fromNode, fromAnchor, toNode, toAnchor));
     return(this);
 }
Example #4
0
 public PWGraphBuilder Link(string from, string to)
 {
     commands.Add(PWGraphCLI.GenerateLinkCommand(from, to));
     return(this);
 }
Example #5
0
 public PWGraphBuilder NewNode <T>(string name, PWGraphCLIAttributes attributes = null) where T : PWNode
 {
     commands.Add(PWGraphCLI.GenerateNewNodeCommand(typeof(T), name, attributes));
     return(this);
 }
Example #6
0
 public void Execute(string command)
 {
     PWGraphCLI.Execute(this, command);
 }
Example #7
0
 //wipeDatas will remove all the graph content before importing the file
 public void Import(string filePath, bool wipeDatas = false)
 {
     PWGraphCLI.Import(this, filePath, wipeDatas);
 }
Example #8
0
 //export the graph as commands in a file and return the created file path
 public void Export(string filePath)
 {
     PWGraphCLI.Export(this, filePath);
 }