2D Top Down Combat: How to only damage enemy that the player is facing? Up,down,left,right

Title pretty much says it all. I can’t find a solid way that works. I just need to detect if the player is directly facing an enemy and then I can call my damage function. I just don’t know how to find if the player is facing the enemy. So far all I can get is killing enemies all around the player instead of directly in front of him.

Any help is much appreciated!!!

Raycasts are a possible solution. You can find tutorials all about Raycasts (you might want to look for Raycast2D tutorials specifically) on youtube, and there’s also the unity help site.