Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NavMeshBuildSettings

The NavMeshBuildSettings struct allows you to specify a collection of settings which describe the dimensions and limitations of a particular agent type.
Read time 2 minutesLast updated 10 days ago

Definition

  • Type: Struct
  • Namespace: UnityEngine.AI
  • Assembly: UnityEngine.AIModule
public struct NavMeshBuildSettings

Remarks

You might want to define multiple NavMeshBuildSettings if your game involves characters with large differences in height, width or climbing ability.
You can also use this struct to control the precision and granularity of the build process, by setting the voxel and tile sizes. Some of the values are coupled, meaning there are constraints on the values based on other values. For example, it’s not valid for _agentClimb to be larger than _agentHeight. To help diagnose violations of these rules, a special method NavMeshBuildSettings.ValidationReport can be evaluated.

Properties

Property

Description

agentClimbThe maximum vertical step size an agent can take.
agentHeightThe height of the agent for baking in world units.
agentRadiusThe radius of the agent for baking in world units.
agentSlopeThe maximum slope angle which is walkable (angle in degrees).
agentTypeIDThe agent type ID the NavMesh will be baked for.
buildHeightMeshEnables the creation of additional data needed to determine the height at any position on the NavMesh more accurately.
debugOptions for collecting debug data during the build process.
ledgeDropHeightMaximum agent drop height.
maxJobWorkersThe maximum number of worker threads that the build process can utilize when building a NavMesh with these settings.
maxJumpAcrossDistanceMaximum agent jump distance.
minRegionAreaThe approximate minimum area of individual NavMesh regions.
overrideTileSizeEnables overriding the default tile size.
overrideVoxelSizeEnables overriding the default voxel size.
preserveTilesOutsideBoundsSpecifies whether to keep the NavMesh unchanged in the sections outside the build bounds during a NavMesh update.
tileSizeSets the tile size in voxel units.
voxelSizeSets the voxel size in world length units.

Methods

Method

Description

ValidationReportValidates the properties of NavMeshBuildSettings.