public readonly record struct NavMeshBuildSettingsWhat the bake is being asked for: how finely to voxelise, and what the agent that will walk the result can do.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A navmesh is baked for one agent. Radius, height and step height are not properties of the level, they are properties of who is walking it, and they are baked in: the surface is eroded by the radius so that a path never passes closer to a wall than the agent's body, and anything with less headroom than the height is not surface at all. Two agent sizes are two navmeshes, which is what every engine that does this does.
Cell size is the quality dial and the cost dial at once. Halving it quadruples the voxel count and the bake time, and buys a surface that follows the geometry twice as closely. A third of the agent radius is the usual starting point.
Fields and properties (19)
public float CellSizeThe width and depth of one voxel column, in world units.
public float CellHeightThe height of one voxel, in world units.
public float AgentHeightHow tall the agent is. Anything with less headroom is not walkable.
public float AgentRadiusHow wide the agent is. The walkable surface is eroded by this.
public float AgentMaxClimbThe tallest step the agent can walk up without jumping.
public float AgentMaxSlopeThe steepest ground the agent can stand on, in degrees.
public int MinRegionAreaThe smallest region to keep, in voxel columns. Anything smaller is discarded rather than turned into polygons.
public int MergeRegionAreaThe size below which a region is absorbed into a neighbour, in voxel columns.
public NavMeshPartitioning PartitioningHow the walkable surface is cut into regions.
public float MaxSimplificationErrorHow far a simplified contour may stray from the voxel outline, in voxels.
public float MaxEdgeLengthThe longest edge a contour may have along a wall, in world units. Zero disables the split.
public int MaxVerticesPerPolyHow many vertices a polygon may have, up to MaxVerticesPerPoly.
public float DetailSampleDistanceHow far apart to sample the ground inside a polygon, in world units. Zero builds no detail.
public float DetailSampleMaxErrorHow far the flat polygon may be from the ground before a vertex is added, in world units.
public byte WalkableAreaThe area id given to every triangle the slope test accepted.
public NavPolyFlags WalkableFlagsThe flags given to every polygon produced.
public int WalkableHeightInCellsThe agent's height in voxels, rounded up.
public int WalkableClimbInCellsThe agent's step height in voxels, rounded down.
public int WalkableRadiusInCellsThe agent's radius in voxels, rounded up.
Methods (2)
public NavMeshBuildSettings()The default settings: a human-sized agent on a 0.3 m grid.
public void Validate()Throws if a setting cannot produce a mesh.
Used by (28)
- BakeBenchmarksVixen.Benchmarks.Navigation
- CrowdBenchmarksVixen.Benchmarks.Navigation
- PathQueueBenchmarksVixen.Benchmarks.Navigation
- QueryBenchmarksVixen.Benchmarks.Navigation
- CrossTileConnectionTestsVixen.Navigation.Tests
- CrowdRetargetTestsVixen.Navigation.Tests
- CrowdTestsVixen.Navigation.Tests
- DetailMeshTestsVixen.Navigation.Tests
- HeightfieldTestsVixen.Navigation.Tests
- NavAreaVolumeTestsVixen.Navigation.Tests
- NavMeshAssetTestsVixen.Navigation.Tests
- NavMeshBakeTestsVixen.Navigation.Tests
- NavMeshBakerVixen.Navigation
- NavMeshDebugDrawTestsVixen.Navigation.Tests
- NavMeshQueryTestsVixen.Navigation.Tests
- NavPathQueueJobTestsVixen.Navigation.Tests
- NavPathQueueTestsVixen.Navigation.Tests
- NavTileCacheVixen.Navigation
- NavTileCacheTestsVixen.Navigation.Tests
- NavigationAllocationTestsVixen.Navigation.Tests
- NavigationSystemTestsVixen.Navigation.Tests
- OffMeshConnectionTestsVixen.Navigation.Tests
- RegionMergeTestsVixen.Navigation.Tests
- TilePlacementVixen.Navigation
- WatershedTestsVixen.Navigation.Tests
- EditorApplicationVixen.Editor.App
- NavMeshImportSettingsVixen.Editor.Assets
- NavMeshImporterVixen.Editor.Assets