File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,11 @@ int main()
7373 // it automated the registering step.
7474 factory.registerFromPlugin (" ./libdummy_nodes_dyn.so" );
7575#endif
76- // register the XML description
77- factory.registerBehaviorTreeFromText (xml_text);
7876
7977 // Trees are created at deployment-time (i.e. at run-time, but only once at the beginning).
8078 // The currently supported format is XML.
8179 // IMPORTANT: when the object "tree" goes out of scope, all the TreeNodes are destroyed
82- auto tree = factory.createTree ( " MainTree " );
80+ auto tree = factory.createTreeFromText (xml_text );
8381
8482 // To "execute" a Tree you need to "tick" it.
8583 // The tick is propagated to the children based on the logic of the tree.
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ int main()
4646 CrossDoor cross_door;
4747 cross_door.registerNodes (factory);
4848
49- // In this example a single XML contains multiple tags <BehaviorTree>
49+ // In this example a single XML contains multiple <BehaviorTree>
5050 // To determine which one is the "main one", we should first register
5151 // the XML and then allocate a specific tree, using its ID
5252
You can’t perform that action at this time.
0 commit comments