![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Static compiler for BT graphs. More...
#include <BTGraphCompiler.h>
Static Public Member Functions | |
| static bool | Compile (const NodeGraph::GraphDocument *graph, BehaviorTreeAsset &outAsset, std::string &errorMsg) |
| Compile GraphDocument to BehaviorTreeAsset. | |
Static Private Member Functions | |
| static bool | CompileNode (const NodeGraph::NodeData &graphNode, BTNode &outNode) |
| Compile a single node from graph to asset. | |
| static BTNodeType | MapNodeType (const std::string &typeString) |
| Map graph node type string to BTNodeType enum. | |
Static compiler for BT graphs.
Compiles GraphDocument (editor format) to BehaviorTreeAsset (runtime format). Validates graph before compilation and provides error messages on failure.
Definition at line 29 of file BTGraphCompiler.h.
|
static |
Compile GraphDocument to BehaviorTreeAsset.
| graph | Source graph document |
| outAsset | Output asset (cleared and populated) |
| errorMsg | Error message if compilation fails |
Definition at line 16 of file BTGraphCompiler.cpp.
References CompileNode(), Olympe::AI::Error, GetComponentTypeID_Static(), SYSTEM_LOG, and Olympe::AI::BTGraphValidator::ValidateGraph().
Referenced by Test6_CompilationSimpleBT(), and Test7_CompilationInvalidNodeType().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Compile a single node from graph to asset.
| graphNode | Source node data |
| outNode | Output BT node |
Definition at line 57 of file BTGraphCompiler.cpp.
References Action, AttackIfClose, Condition, GetComponentTypeID_Static(), Idle, MapNodeType(), Repeater, SetMoveGoalToTarget, TargetInRange, and TargetVisible.
Referenced by Compile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Map graph node type string to BTNodeType enum.
| typeString | Type name from graph |
Definition at line 133 of file BTGraphCompiler.cpp.
References Action, Condition, GetComponentTypeID_Static(), Inverter, Repeater, Selector, and Sequence.
Referenced by CompileNode().
Here is the call graph for this function:
Here is the caller graph for this function: