Node Graph
Node Graph is a tool for organizing data and creating logic through visual representations on a graph. It allows you to design and edit logic at design-time, to create a logical flow that executes at run time.
How it works?
Think of Node Graph like a JSON save file in an RPG game. Just as a save file contains all the necessary data to load items, attributes, and map exploration, Node Graph stores the logic and data in a structured format. When the game runs, this data is used to construct the necessary runtime behavior.
In practical terms, Node Graph operates by saving your data in ScriptableObjects for later execution. The majority of the system (about 90%) is focused on design-time and editor functionalities, while the remaining 10% handles runtime execution.
For instance, if you want to build a custom State Machine from scratch, you can define a class derived from MonoBehaviour or ScriptableObject. This class will have variables that you edit and save through the Unity Inspector. When you start the game, your component will use these settings to execute its instructions.
In terms of how this will be executed, it's practically the same thing. However, Node Graph simplifies this process by providing a visual interface that allows you to see how your logic is structured. It organizes elements into nodes within a graph, making it easier to understand and manage the flow of your logic.
See more about how data is organized in Graph Data and Graph Sub Asset