NavMeshSurface script gives different NavMesh than Navigation -> Bake

Hello,

I don’t know why but script is not generating nav mesh as I want. This is what I’m getting from script:


And this is generated from editor:

Do you have an idea why script works like that and how to fix it? I really appreciate any help.

I’ve found solution. If you have such a problem make sure that:

  • NavMeshSurface script is attached to empty GameObject which is a parent of area you want to bake
  • Area you want to bake is facing up direction