OnBecomeVisible is called when object is behind walls...

Hi. My problem is simple: I have a script that plays a sound when I see a NPC. But it plays it when the NPC is behind walls (The walls have a collider).

Is there any way to avoid this?

Thanks in advance :slight_smile:

Cast a ray.