I am trying to block a signal when there is a structuring obstructing the object.

Currently, I have a cube that acts a beacon and an empty object which has a sphere collider. I have written a script such that the color of the cube changes when it enters the sphere collider radius. So, basically the sphere collider acts as a signal and the cube as a beacon. Now, I want to place a tall structure within the sphere collider and the signal radius should be reduced as an object is blocking its path but should remain the same on the other three sides. I know it might not be possible with a collider. So, is there some other way for this to happen.

Thanks in Advance.

Usually this can be done by Raycasting. So you send ray from your beacon to the target. If it hits, that means the signal wasn’t blocked and you fire some method. You need to assign proper layers, what is consider as a blockable object, and your logic when you send it, etc. So you rework some base from this example:

 RaycastHit hit;
        // Does the ray intersect any objects excluding the player layer
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, Mathf.Infinity, layerMask))
        {
            Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * hit.distance, Color.yellow);
            Debug.Log("Did Hit");
        }
        else
        {
            Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * 1000, Color.white);
            Debug.Log("Did not Hit");
        }

Also consider joining ArtOfMakingGames - Unity learning discord channel:
where you can find help, explanations, and other useful materials.

Thank You, This has been very helpful