If camera does not see an entity with the mesh as an example, the mesh is not rendered automatically - so this you don’t need to do.
Are you trying to disable updates of the script on the entity? Or what is it specifically you’re trying to disable.
Usually things like this are done using some grid system. You test individual cells for visibility, and load / enable their content when nearby / visible or similar. This is a typical level streaming system. Is this what you are after?