Skip to main content

Graph Runner

It is the primary component for executing graphs and can handle any asset that inherits from GraphData. Additionally, it is essential to have the GraphVariableComponent in place.

To learn more about variables, see Variables and Parameters.

GraphRunnerClasses

Advanced Topics

Core classes

  • GraphData: Stores all GraphSubAsset that make up your graph, the start Node and the initial value of your LocalVariables
  • GraphVariableComponent: Store the value of your ReferencieVariables
  • GraphController: Abstract class that will have the implementation a graph logic, for example State Machine
  • GraphEvents: Used to replicate events from the GameObject associated with the GraphRunner, for example OnTriggerEnter

GraphRunnerClasses

Order of execution

The flowchart below, what exactly is happening in terms of order of execution.

ExecutionOrder

Note: In terms of performance, the initialization is a little expensive as it uses reflection to find all parameters, but during updates high performance is expected. This also applies to SubGraphs, which instantiate GraphController on the first interaction.

It's not something you should worry about immediately, however, is better to use some SubGraphs instead of having a single GraphData with hundreds of GraphSubAssets .