A* Pathfinding Project

Crash when scanning graph with lots of RecastMeshObjs?


#1

I have a fairly large procedural world that I’m trying to cover with a Recast Graph. RecastMeshObj seems to offer more flexibility than rasterizing meshes or colliders, so I decided to give it a try. Every time I try to scan my large world, however, Unity crashes.

I’m marking ~5,000 objects with RecastMeshObj, and have managed to track the crash down to the recursion in QueryBoxInBounds within RecastBBTree. Am I simply throwing too many objects at it? Scanning normally for my size world works, but there are some details I’d like to tweak, and RecastMeshObj seems like just what I need.

If it turns out this won’t work, I imagine I’ll have some follow-up questions about other approaches I might pursue…

Thanks for the help!


#2

Hi

Do you happen to have a stacktrace or error message for when it crashes?


#3

Afraid not. It crashes hard, to the desktop. The last thing written to the console (found in the Editor log), is the line about “Finding Meshes.”

I used that as a hint to place some good breakpoints so I could step through the code and find exactly where it was crashing. It never makes it past CollectMeshes in RecastGenerator, and seems to crash at the recursion in QueryInBounds (called by RecastMeshObj.GetAllInBounds < RecastMeshGatherer.CollectRecastMeshObjs < RecastGenerator.CollectMeshes).