How can I check that player is looking at entity?

I need to show custom entity info when player looking at it and only for that player

I've found that the text i can show with "ddraw.text" (correct me if i'm wrong)
But how can i detect that player looking at this entity? 

 

Thanks for your help in advance

Use raycast

Yeah, I understand that raycast helpful to detect point player looking at

Maybe my question was incorrect. What i need is to show to player entity info placed on that entity anytime this entity appear in player field of view 

My first thouht was to get all player around each custom entity every 1 second using "Physics.OverlapSphere" and show this entity info using "ddraw.text" at this entity location for 1 second. But I worry that this is not better way for performance

Raycast can show the entity player is looking at.