An example of using behavior trees in Unreal Engine. The nodes for the tree are written in C++ and blueprints, a perception system is used to search for a player.
Behavior diagram (click to enlarge):
Implementation using behavior tree (click to enlarge):
the example is developed on Unreal Engine 5 for educational purposes.