Enemy Line of Sight

What exactly is the best way I should go about implementing a Line of Sight feature for these enemies I’m creating? I’m currently using raycasting which seems like the ideal way to do it though I’m only using one raycast so basically the enemy can only see the player when looking in their exact direction which of course isn’t what I want.

So should I be using multiple raycasts or is there another way I should be doing this?

You probably want a vision cone / field of view for your enemy. I think the implementation here should work fine:

There are also a video tutorials that I haven’t watched, but seem good: