- Home /
Multiple Navmesh Bakes
Hello, guys I have a question. Is the Navmesh bake additive? I mean, if I bake a navmesh, when I bake again, the previous baked data will be added? Or overwritten?
Answer by EXHOUL · May 06, 2020 at 04:21 PM
Ok Thank you! Is there a way to achieve that "addition"? I think that maybe I can use the Navmesh Surface component, but it doesn't generate offmesh links, does it?
Are you using the component based navmesh system or the normal navmesh system? If you don't know, the component one has to be downloaded deliberately so you're using the normal one.
With the normal one, any valid surface in the scene gets navmesh baked into it. Surfaces are valid if: They're the surface of a rendermesh (invisible colliders don't get navmesh) They're not too steep for your agent to climb (you can change how steep is too steep in the navmesh setting window)
If you select a rendermesh with the navmesh settings window open, you can change whether it should generate links to nearby navmeshes or not. You can also say how far away the navmeshes can be before you stop generating links between them.
Thank you for your answer! I already deliberately downloaded the navmesh components assets, and I'm trying these and the normal navmesh system. As you said, I can generate offmesh links with the normal navmesh system. But I need to do multiple bakes of navemesh or different bakes in different areas. I know I can do that with the component based navmesh system, but I think it won't let me automatically generate the offmesh links as the normal system does. Is there a way to automatically generate offmesh links using the component based navmesh system? Or should I add them manually after baking?
Glancing at the documentation, I think you have to add them manually. If your project is sufficiently complicated, you could probably justify writing a script that generated the links for you. As they're just components that take vector3s, you'd just need to find the edges of your individual navmeshes and check to see if they were close enough to any other edges to justify the generation of links. There are equations for finding the distance between lines out there, I'm sure.