Baking Navmesh at runtime freezes the game for a couple seconds
Hello all, I'm making a 3d game about a monster that pathfinds himself to you in a randomly generated maze. I use this:
surface.BuildNavMesh();
to bake the navmesh at runtime right after the maze is generated, then once you collect the key in the maze, the rooms switch, requiring me to rebake. This works fine, but the game freezes in place for about two seconds while the navmesh is rebaking. Does anyone know of a way to bake while the game is running, or how to maybe play a short cutscene while this is happening? Any help is always appreciated!
Answer by BobbySterling · Mar 25, 2021 at 08:03 AM
Did you find a fix to this? Its happening to me and the wierd thing is that i changed nothing, my navmesh baking used to not freeze but after launching one day, it just started freezing, super fustrating.
Your answer
Follow this Question
Related Questions
NavMesh not baking underneath 'overhead' sections of mesh, for one particular mesh only. 1 Answer
Is It Possible To Generate NavMesh Areas from Terrain Textures? 2 Answers
NavMesh bakes at position 0,0,0 regardless if there is something there or not? 1 Answer
Nav Mesh on stairs gets cranky 0 Answers