State & Information
remainingDistance: How far to go
pathPending: Is path still calculating?
pathStatus: Current navigation status
nextPosition: Where agent heads next
hasPath: Valid path check
autoBraking: Control stopping behavior
Pathfinding & Queries
CalculatePath: Manual path planning
NavMesh.SamplePosition: Find valid NavMesh positions
path: Assign custom navigation paths
NavMesh.AddNavMeshData: Dynamic NavMesh updates
OffMeshLink Features
isOnOffMeshLink: Check special path segments
currentOffMeshLinkData: Get link details
ActivateCurrentOffMeshLink(bool): Enable/disable link traversal
CompleteOffMeshLink: Finish special path segment
autoTraverseOffMeshLink: Automatic link handling
Advanced Control
avoidancePriority: Agent collision importance
obstacleAvoidanceType: Quality vs Performance
Warp: Instant position changes
areaMask: Control walkable areas
stoppingDistance: Fine-tune arrival precision
CRITICAL Pro Tips
Cache your NavMeshAgent reference in Awake()
Always check pathStatus before moving
Use NavMesh.SamplePosition before SetDestination
Handle OffMeshLinks for jumps/teleports
Configure stopping distance carefully
Check isStopped && !pathPending to detect obstacles
Consider NavMeshObstacle carving performance impact
Common Pitfalls
- Setting destination every frame
- Mishandling OffMeshLink activation (forgot the bool parameter)
- Wrong avoidance settings in crowds
- Forgetting to clear paths with ResetPath()
- Not handling pathPending status
- Assuming positions are valid without SamplePosition check