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()
73
73
// it automated the registering step.
74
74
factory.registerFromPlugin (" ./libdummy_nodes_dyn.so" );
75
75
#endif
76
- // register the XML description
77
- factory.registerBehaviorTreeFromText (xml_text);
78
76
79
77
// Trees are created at deployment-time (i.e. at run-time, but only once at the beginning).
80
78
// The currently supported format is XML.
81
79
// 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 );
83
81
84
82
// To "execute" a Tree you need to "tick" it.
85
83
// 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()
46
46
CrossDoor cross_door;
47
47
cross_door.registerNodes (factory);
48
48
49
- // In this example a single XML contains multiple tags <BehaviorTree>
49
+ // In this example a single XML contains multiple <BehaviorTree>
50
50
// To determine which one is the "main one", we should first register
51
51
// the XML and then allocate a specific tree, using its ID
52
52
You can’t perform that action at this time.
0 commit comments