Name | Return type | Description |
---|---|---|
GetInstance() | GraphRunner | Get the singleton instance. |
RunGraphDuringRuntime(GraphData graphData, Action<GraphFinishedEvent> listener, GraphSeed graphSeed = GraphSeed.Random) | void | Run a graph based on a GraphData object, which contains serialized data on properties, nodes, edges, and port values. This version of the RunGraph method will not visually show the graph, and is usable during runtime. After the graph is finished, the ‘listener’ will be invoked, and the GraphOutput that was produced will be passed into the listener method. An example of a listener method:
World generatedWorld = evt.generatedOutput.GetProperty<World>("New World"); WorldBuilder.GetInstance().PlaceTiles(generatedWorld, transform); } Which would be invoked using: |
RunGraph(GraphView graphView, Action<GraphFinishedEvent> listener = null, GraphSeed graphSeed = GraphSeed.Random) | void | Run the graph that is currently loaded in the TerraTiler2D editor window (also known as a GraphView). This method is used by TerraTiler2D to execute your graphs in the Unity editor, but is also available for users if they wish to make changes to the TerraTiler2D editor. After the graph is finished, the ‘listener’ will be invoked, and the GraphOutput that was produced will be passed into the listener method. An example of a listener method:
World generatedWorld = evt.generatedOutput.GetProperty<World>("New World"); WorldBuilder.GetInstance().PlaceTiles(generatedWorld, transform); } Which would be invoked using: |
StopGraph(GraphView graphView = null) | void | Tries to stop the graph that is currently running in the target GraphView. |
GetPreviousSeed() | int | Gets the seed that was used for the previous graph execution. |