I noticed the problem I’m having is very similar to this issue Graph does not work in build - General / Recast graph - Support Forum (arongranberg.com). Everything works as intended when running in the editor, but when running in the player the AI’s are unable to get a path. Just like in the linked topic, there are no errors occurring. In the editor, scanning the mesh at runtime takes about 40ms, while standalone takes 90-100ms.
In your answer, you said:
"Typically, this can happen if
- The meshes are not readable at runtime. This shouldn’t be an issue for you, though, since you are using collider meshes, and they are usually readable.
- Your objects end up in the wrong layers in the build.
- Your objects are loaded asynchronously, and they aren’t actually loaded at the time when the scan happens."
Hopefully this is enough info about my situation:
The colliders being used are one terrain collider, five Umodeler mesh colliders (mentioning because I saw in a different topic that probuilder makes meshes difficult for the pathfinding to work with), and all others are character controllers.
I will admit, I know less about how layers (and unity) work than I would like. The gameObjects using pathfinding are all part of the “Troop” layer. Players are “Player”. The walkable area is on the “Ground” layer. Could these custom layers be messing things up?
While probably not the best solution, my troops set their destination every frame by checking their RichAI.hasPath field, and using AIDestinationSetter in Update().
In the logs, it is clear that scan() happens. But, even with the “cache on startup” option selected in the pathfinder component, it seems like the RichAI’s are not able to create a path.
I can supply video of the problem and logs if necessary. Thank you!