Is there a way to bake lighting by script?

I’m trying to bake the lighting by script whenever the skybox is switched.

Found this on this thread:
https://forum.unity.com/threads/runtime-light-baking-solved.520202/
Basically there is an asset that’s now been moved to GitHub. Here is the link: