I’m trying to bake navigation info onto a simple mesh following the instructions outlined here. The mesh is marked as navigation static. I then go to the Navigation Window and click on the Bake button, but nothing happens. If I go to the scene, I find a file called NavMesh.asset with some data related to the navigation, but the mesh is not colored blue (as it usually is when navigation is successfully baked). If I create an Agent with this NavMesh, when I press play I get an error indicating the NavMesh is not valid.
I’ve tried several combinations and approaches but I always get the same result. What am I doing wrong? Can someone please help me? I’ve been stuck with this for a couple of days and it’s driving me crazy :x
Thanks in advance,
Jos
P.S. It’s worth noting that nothing is displayed on the Editor and no log entry is generated when I click the bake button. It only creates the NavMesh.asset with (apparently) invalid data.
The main problem is that the NavMesh baking tool is fairly inconsistent. Sometimes it works, then you change the most minimal thing (like moving a vertex) and the baking doesn’t work anymore.
The thing that bothers me the most is that I don’t get any feedback whatsoever about what am I doing wrong.
“but the mesh is not colored blue” - What colour is it?
In relation to an invalid Nav Mesh error, can you post some screenshots so we can see after the bake and also see the nav mesh layer /s? if the agent doesn’t match that layer it cannot attach to it.
After some more experimentation, I found out what the problem was (and it’s not related to the layers, but thanks for the suggestion either way):
I turns out that my model (imported from FBX file) was too small, because by default unity scales them by 0.01. So when I wanted to bake a NavMesh using this model, the process was working correctly (supposedly), but (and it’s a big but - no pun intended), doesn’t show the blue mesh because it was basically infinitesimal (to small to see). To explain a little bit further, the default (an even the minimum) values permitted by the baking were many times greater than the actual model dimensions, so when the baking process tried to calculate where the NavMesh would go, there was not “enough room” for it to fit the most minimal unit of a NavMesh. Make sense?
So, to fix this issue, I just scaled my model until the baking process was able to calculate enough data for it to show the “long sought” blue mesh of success
Either way, it would be nice if Unity would issue a warning like “Unable to bake mesh because it is too small!!!”, or something like that so that you would not have to spend days trying to figure out what was wrong using your 6th sense, or spider sense or experienced-programmer sense, or whatever sense you might have developed for this kinds of situations.
Damn , i had been stuck with this problem for past few hours untill i came across this post. Thanks it worked, but what i’m trying to achieve is animate the light through navemesh , say like i have an octupus , and the light has to illuminate all its legs being navemesh agent, and the octupus is small in size. what would be the good approach to do this?
Sorry for reviving a dead thread, but I came across this as I was having issues with the navmesh baking.
For me, all of my object’s scale was: 1, 1, 1. and in the NavMesh baking options, the height was set to 2, thus leading to it not baking as it couldn’t. Hope this helps someone.
Just throwing out here that I had about the same issue, and mine was solved by setting the Min Region Area in the advanced baking settings to a lower value, since the areas I was trying to bake were very small.
I get the issue and didn’t work any of above answers, and figure out the solution is unbelievably stupid. If you baked while turned off the Gizoms, you will not see the blue area, so just turn on the Gizmos. God I’m feel so stupid now lol :).