Call Navmesh Bake from Editor Script?

I’m trying to make Unity bake navmeshes fro the current scene from an editor script.

I’m not talking about realtime, just a way of calling Navmesh Bake from an editor script instead of having to manually click the button every time I update stuff.

I couldn’t find anything in the manual. Is there a way of accessing it somehow?

I’m an idiot. It’s right here in the documentation:

NavMeshbuilder.BuildNavMesh