How to "bake" NavMesh from script at runtime?

maykl harutyunyan picture maykl harutyunyan · Sep 5, 2018 · Viewed 11.8k times · Source

how to bake NavMesh in runtime from script. I searched in Google but did not find.
some rendered scene and buttons including bake

Answer

theInsomniacGameMaker picture theInsomniacGameMaker · Sep 6, 2018

Currently, Unity doesn't have a way to bake but NavMesh at runtime BUT there is an experimental package that Unity has that allows you bake a NavMesh at runtime. It is very stable package.

There were tutorials made by Brackeys in collaboration with Unity.

The demo project is available for download on GitHub. You can use in the scripts in there to bake a runtime NavMesh.

I would highly recommend watching the tutorial first.

Here is also the link for Unity's site and tutorials on runtime navmesh.