I am making a voxel game, and so far, as I understand, lightmapping and baking can be done in the editor, by selecting the light sources, the terrains and then baking everything. However, I do not have anything in the Unity editor to bake, because terrain is generated at runtime.
Because google has not yielded anything in regards to baking at runtime, how can I bake my terrain after I have created it after running the game?
Basically, lets say it creates 4 chunks, and the game/map has a directional light, how can I script it so that lightmapping and baking starts after the terrain is generated?
There seems to be this bug:
It seems like the shadows arent properly displaying at these type of locations, I assume this is due to not having shadows baked, am i correct? Adjusting the Bias also didnt help
Edit: I adjusted the light bias to show the problem more clearly: