Quick answer: A bake only uses geometry the NavigationMesh is told to parse: by default mesh instances that are children of the region. If your level is elsewhere, uses only collision shapes, or sits on a different collision layer, the bake comes out empty. Then check that agent_radius is not larger than your corridors and that cell_size matches the navigation map.
You click Bake NavigationMesh and get nothing, or a mesh with holes where floors should be. The baker is doing what it was configured to do; the configuration just does not point at your level.
1. What geometry is parsed
In the NavigationMesh resource (3D) under Geometry:
- Parsed Geometry Type: Mesh Instances, Static Colliders, or Both. A level made only of StaticBody3D collision shapes with no meshes needs Static Colliders or Both.
- Collision Mask: when parsing colliders, only those on these layers are used.
- Source Geometry Mode: Root Node Children (default — only children of the NavigationRegion3D), Group With Children, or Group Explicit. If the level is a sibling of the region, nothing is parsed. Either make the level a child of the region or add it to a group and set Source Group Name.
NavigationRegion2D's NavigationPolygon has the same options under Geometry for 2D (Godot 4.2 and later), plus the TileMap physics or navigation layers.
2. Agent settings erase small areas
Agent > Radius shrinks walkable space away from walls; a corridor narrower than twice the radius disappears. Agent > Height removes areas under low ceilings, and Max Climb and Max Slope remove steps and ramps that are too steep. Bake with small values to confirm the geometry is found, then raise them.
3. Cell size mismatch
The NavigationMesh Cell > Size and Height should match the navigation map's cell size (Project Settings > Navigation > 3D > Default Cell Size). A mismatch produces warnings and regions that fail to connect. Very large cells also lose detail around small obstacles.
4. Baking at runtime
bake_navigation_mesh() runs on a background thread by default. Do not query paths until it finishes:
$NavigationRegion3D.bake_navigation_mesh()
await $NavigationRegion3D.bake_finished
Procedurally generated levels must be fully added to the tree (with their collision shapes created) before baking.
5. CSG and imported scenes
CSG shapes count as mesh geometry. For imported .glb levels, the meshes are inside the instanced scene; Group modes are often easier than restructuring the import.
6. Check what was baked
Enable Debug > Visible Navigation and run the game. If the baked mesh looks right but agents still do not move, the problem is pathfinding, not baking — see NavigationAgent2D returning an empty path.