What I did is use tags to tag the player as Player and enemies as Enemy.
Then, I would use “Actor Has Tag” which returns a bool, and if true, assign that character to a variable.
It works quite well.
Also, you can use AIPerceptionStimulus, but I never used that. Probably is the better option, but that means you have to add it to everything that you want the AI to notice.