Accessing the output of a graph is pretty straight forward. As explained earlier
, properties act as the input and output of your graph.
The properties in your GraphData
object act as the input. These can be accessed and changed from a script using the GetPropertyValue()
methods on your GraphData object, or manually by using the variable fields in the properties window. For more information on the Get and Set methods, take a look at the GraphData
After running a graph using your GraphData object, a GraphOutput
object is created. This GraphOutput object contains all of the same properties as your GraphData object, but these include any changes applied by your graph. If your graph added a TileLayer
property "myWorld", the GraphOutput property "myWorld" will include that tile layer. Your GraphData object on the other hand, will not have that added tile layer.
: It is advised to read GraphData
carefully, as incorrect usage of this class may result in corrupted data. This is because you are setting values on a persistent data type, which may permanently overwrite data you did not want to lose. The GraphData page explains how to prevent this.
Check out the Properties demo included with TerraTiler2D for examples on getting and setting property values, and for examples on persistently saving and loading graph data instances.