Bake occlusion in script OR making new one?

I need an occlusion solution for a procedurally generated 3D world.

Built-in occlusion baking is editor-only, I can’t doing it in game through script.
I tried Lightmapping.BakeAsync(); but Lightmapping is not recognized even with SceneManager import.

Is there any alternative to bake it after the world has done generating?

Or

Creating a new one

I can disable every object that is behind the camera.

After world generation done, saving the position of every object with its reference. Then calculate if it is in front of camera angle instead of raycasting method, and SetActive Off if out of view, else On.

Do you have suggestion on the best approach?

You ask about bake occlusion, but then discuss baking lightmaps, so I'm confused. BakeAsync is found in UnityEditor.Experimental.Lightmapping.BakeAsync (...);

–

I don't know what to use for occlusion, this is my question. I found that function that is part of Lightmapping process, isn't it? True or false doesn't matter, it doesn't help my problem that still simple

–