Best Way to Detect an Enemy?

To keep this simple, I have an NPC and I need it to detect when an enemy NPC enters into a certain radius of it. I think there are probably many ways to do this but I am wanting to find the most efficient and practical one so if you have an idea on how to do this please share, help is greatly appreciated.

You can use the Vector3 value of where your NPC is and the Vector3 value of the players and use Magnitude to get the distance between the two points.

This won’t account for line of sight though, as that requires Dot Products and raycasting.

I seriously recommend watching this dude’s channel on pathfinding. It might be long, but the results are really great. It takes into account many factors.