Why the light passes through the mesh, how to make the polygons that refract light

Unity materials have a variety of built in properties that you can alter to get different effects. For example, to make something partially trasparent (see-through), something like

gameObject.renderer.material.SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 0.7f));

should do the trick.

For other properties just replace "_Color" with "_SpecColor", "_Emission", or "_ReflectColor"

Keep in mind that all of these will only affect what the object itself looks like. If you are wanting the light itself to dynamically refract that’s a little more involved

If none of this is what you were looking for, feel free to give more details so I can refine my answer.

In the first case, the wall does not break a highlight on the floor from a point of light in the second wall will not stop the light and he lands on another wall, how to make sure to highlight the floor refracted by the red line (as it should check). And the light does not penetrate through objects

[4472-без+имени-2.jpg|4472]