"I am looking for best practices regarding performance and scalability for complex Behavior Trees (BTs).
The Situation:I have X NPCs, each capable of performing various jobs (e.g., blacksmith, guard, farmer). NPCs can switch between these jobs dynamically during runtime. Currently, my approach is to have one massive Behavior Tree per NPC that contains the logic for all possible jobs, using a conditional branch to enter only the currently active job's subtree. I use subtrees for each job, but I don't swap them out; instead, they lie next to each other and are essentially unpacked at runtime.
The Question:Is Behavior Designer intended to handle such complex, 'all-in-one' trees, or is it better practice to swap subtrees via script at runtime? What is the best practice approach for maintaining performance and readability in this scenario?
The Situation:I have X NPCs, each capable of performing various jobs (e.g., blacksmith, guard, farmer). NPCs can switch between these jobs dynamically during runtime. Currently, my approach is to have one massive Behavior Tree per NPC that contains the logic for all possible jobs, using a conditional branch to enter only the currently active job's subtree. I use subtrees for each job, but I don't swap them out; instead, they lie next to each other and are essentially unpacked at runtime.
The Question:Is Behavior Designer intended to handle such complex, 'all-in-one' trees, or is it better practice to swap subtrees via script at runtime? What is the best practice approach for maintaining performance and readability in this scenario?
