IPlayReceiver
You can implement a method to be called when the graph is played.
Please note that in the case of function graphs, this is called when the function graph itself starts playing, regardless of the playback status of the parent graph.
How to write a script
- Implement
LogicToolkit.IPlayReceiver
in types that inherit from various NodeComponents. - Implement
public void OnPlay()
.
Code example
|
|
In this example, we'll store the time when the graph starts playing and print the elapsed time as it runs.