SemaphorGames
New member
Hello, I seem to be getting a decent performance hit from my Behavior Trees. I have a strong feeling that I'm doing something/multiple things very wrong to get this performance drop.
The profiler shows ~35% total in BehaviorManager.Tick(), expanding the hierarchy is a big mess of BehaviorManager.RunTask(), RunParentTask(), PushTask(), PopTask() etc which leads me to believe I've structured my trees rather badly.
On each NPC I have 3 Behavior Trees running simultaneously, En_Detect, En_Move and En_Attack:
These Behaviors need to run every tick as movement handles the enemies aiming and turning around and such. These Behaviors are on my NPC Prefab, NPCs are spawned by instantiating the prefab.
I'm not using external trees or anything. I'm using version 1.5.11.
Is there anything glaringly bad that sticks out that would cause this performance drop?
The profiler shows ~35% total in BehaviorManager.Tick(), expanding the hierarchy is a big mess of BehaviorManager.RunTask(), RunParentTask(), PushTask(), PopTask() etc which leads me to believe I've structured my trees rather badly.
On each NPC I have 3 Behavior Trees running simultaneously, En_Detect, En_Move and En_Attack:
These Behaviors need to run every tick as movement handles the enemies aiming and turning around and such. These Behaviors are on my NPC Prefab, NPCs are spawned by instantiating the prefab.
I'm not using external trees or anything. I'm using version 1.5.11.
Is there anything glaringly bad that sticks out that would cause this performance drop?