Search code examples
unity-game-enginenavmesh

How to "bake" NavMesh from script at runtime?


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


Solution

  • 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.