How can I hide/expose a gameobject based on its distance from the player/camera?

Im currently working on an infinite universe project, and one of the things is having to optimize the hell out of it. I need to figure out how to enable and disable solar systems or galaxies based on how far away they are from the fly-Cam. does anyone know how to achieve this, if so can you please help me?

You can manipulate the clipping plane value in the camera inspector.