Bug: Error Creating Pilgrim Agent Without Town Center Access
113 °C
Bug #9

Error Creating Pilgrim Agent Without Town Center Access

Status: New
Priority:
High
Added by:
Kozonak
on October 24, '25
Assigned to:
Unassigned
Due date:
Reported for:
V0.681 Auto

Steps to Reproduce

No steps to reproduce

Explanation

Lowering a tile with a pilgrim that has no access to the town center returns errors. The error message 'Failed to create agent because it is not close enough to the NavMesh' is encountered. The stack trace indicates issues within the UnityEngine.AI.NavMesh and Unity.AI.Navigation.NavMeshSurface components, specifically when attempting to add and rebuild the NavMesh. This results in failed agent creation and potential navigation issues for the pilgrim.

This issue was created from the following Discord message:
Bug: Lowering a tile with a pilgrim that has no access to town center returns errors

Failed to create agent because it is not close enough to the NavMesh
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.AI.NavMesh:AddNavMeshDataTransformedInternal (UnityEngine.AI.NavMeshData,UnityEngine.Vector3,UnityEngine.Quaternion)
UnityEngine.AI.NavMesh:AddNavMeshData (UnityEngine.AI.NavMeshData,UnityEngine.Vector3,UnityEngine.Quaternion)
Unity.AI.Navigation.NavMeshSurface:AddData ()
Unity.AI.Navigation.NavMeshSurface:BuildNavMesh ()
TerrainTransformer:RebuildSingleNavMesh (TerrainTransformer/NavMeshType,TileManager)
TerrainTransformer/d__19:MoveNext ()
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
Link

Watchers

Screenshots

None

Video Clips

None

Log Files

None

Device

No device information

[ #1 ] about 1 month ago by

After doing this the population never decreases (from spells, getting killed). Note town is on a single square in the middle of water.

[ #2 ] about 1 month ago by

I think if the exception hits, something gets stuck. Lowering land should kill any settler nearby

You need to join this project to comment on issues. Join Project