Can you disable shadows that are not seen by the camera ?

I am wondering if you can make so that shadows are not shown only if they are in the camera range. Something like occlusion culling for objects but for shadows. If there is something like that in Unity please let me now.

My first question is: Why do you need this?

Shadows disappear together with the occlusion culling of objects. So occluded objects will not render any shadows, static or realtime this doesn’t even matter.

If you just want the shadows not to be rendered when not visible by camera, you can implement custom logic to turn off the casting of shadows per MeshRenderer.

Look into “Renderer.isVisible” and “Cast Shadows” within the MeshRenderer