This should not happen!

I’m getting an error. Any idea why this might be happening (when it shouldn’t!)

I’ve been making some modifications to my environment recently, so it probably has something to do with that.


This should not happen
UnityEngine.Debug:LogError(Object)
Voxelize:Triangulate(Int32, Int32[], Int32[]&, Int32[]&) (at Assets/Addons/AstarPathfindingProject/Generators/Utilities/Voxels/Voxelize.cs:1218)
Voxelize:BuildPolyMesh(VoxelContourSet, Int32, VoxelMesh&) (at Assets/Addons/AstarPathfindingProject/Generators/Utilities/Voxels/Voxelize.cs:922)
Pathfinding.RecastGraph:Scan() (at Assets/Addons/AstarPathfindingProject/Generators/RecastGenerator.cs:542)
c__IteratorC:MoveNext() (at Assets/Addons/AstarPathfindingProject/Core/AstarPath.cs:1567)
AstarPath:Scan() (at Assets/Addons/AstarPathfindingProject/Core/AstarPath.cs:1515)
AstarPath:Start() (at Assets/Addons/AstarPathfindingProject/Core/AstarPath.cs:1088)

After some investigation, I found the problem is caused by a line or rocks in my world. If I replace the rock’s default mesh collider with a sphere collider, the error no longer occurs …

Hi

Yes, the recast code that I have ported, from which that error comes from does seem to be a bit unstable and in some very rare cases throw that error. I usually change the voxel size by something insignificant and that removes it. I haven’t, been able to track down exactly what causes it or how to fix it unfortunately.