Behavior Tree Tutorial

FindClosestEnemy is member function of AShooterAIController exposed to blueprints. It can’t exist on engine level, since concept of “enemy” and how it should be picked depends on game design.

You can use blueprint function GetAllActorsOfClass to obtain all actors of interest and iterate through them to select best one.