Unity 3d Nav Mesh Baking

My question is about NavigationMeshes, I have prepared a grid based map generator. I can create a map made up of cubes that are divided into walls and floors.

after generating this I can save it as a compilation, later in the navigation menu I can bake the nets, but what comes next is that I would like to save it as a compilation with sea routes already baked. When I do this and remove the card from the scene, it disappears, but the baked mesh is still there. To re-place the card on stage in a different location, I have to bake again. The basic idea was to generate "x" levels with baked meshes and then just create them whichever level I want. Is it possible? Thank you for your time.

Edited: After baking some exmaple navmesh, a folder called the same as the scene I'm working on is called and there is a navmesh file inside. Now here's my edited question. Can I bake several different navs for every different map, and later, after loading such a map, use the proper navmesh in the code so that they interact well?

+3


source to share


1 answer


after generating this I can save it as a compilation, later in the Navigation menu I can bake the grids, but what happens next is that I would like to save it as a compilation with already baked names

Unfortunately this is not possible. NavMesh

are saved by the scene and currently you cannot explicitly link / create them.



On the other hand, it should be possible to use additive scene loading to use multiple lightmaps stored in different scenes. Have a look at Application.LoadLevelAdditive .

Instead of storing the navmesh in a prefab, you can use a dedicated (ultimately empty) scene and load it on demand.

+3


source







All Articles