I have a problem with streaming in my enemy characters and their AIControllers. It causes pretty big lag spikes on CPU and since i’ve never done anything remotely close to optimization I would like to get some advice where should I start. I know that behaviour tress load all tasks in and AiController is active at the start so my first thought was to try to do something about it. In behaviour tree i have about 20 pretty easy tasks switching between melee and ranged combat in addition to some movement paired with EQS. Bt itself doesn’t run anything except some basic varaible setting until the player is seen. My AiController is basicly just runing behaviour tree and assigning blackboard + pawn sensing.
I would love to hear from someone who had similar issue or can give me some tips how to approach this situation. If any more information is needed i will gladly provide it.