I have created a behavior tree for an AI that is in Search mode by default unless it sees an enemy, then it pursues it and searches its last known position if it loses sight of it.
I am getting a lot of lag, so something (or multiple things) in my design are probably being called every frame...