Reply To: Runtime Sub-Behaviour Tree

NodeCanvas Forums Support Runtime Sub-Behaviour Tree Reply To: Runtime Sub-Behaviour Tree

#17665
robuspl
Participant

Hey,

Thanks for responding.
My case is that I have defined ScriptableObject which holds behavior tree respond for agent role in the world ( cutting trees, patrolling, etc. ) and I wanna initialize it/plug it into a sub-behavior node in the original root graph.So whole base agent role is included in root graph but the logic response for a role may change at runtime

A solution that I found recently is to attach all available roles behavior trees into list in Blackboard, and then expand behaviour tree property in sub-behaviour node and change it at runtime. Only problem I see with it is that each agent will hold an initialized version of each role in the world. Idk yet if its a big problem in terms of memory etc. but ideally would be to initialize only needed role and if agent will change it then clear old one and initialize new one.