iOS: Recast Navmesh Doesn't Work?

Hi! I just bought the Pro version of A* for the dynamic pathfinding / auto-navmesh generation. It works perfectly in the editor, but when I build to iOS, it doesn’t work at all.

And yep, I already followed these instructions. No improvement. I wasn’t using Fast and No Exceptions at first, but then tried that too. Also no luck (it actually crashes).
http://arongranberg.com/astar/docs/iphone.php

The output log when running the build from Xcode is spitting this:
Couldn’t find close nodes to the start point or the end point
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

Info: Mac OSX 10.11.1, Unity 5.2.2, iOS 9.1, A* Pro v3.7.4.

No matter what I do, it always works in the editor but not on iOS. It also never not worked in the editor. Advice?

-Xander

Hi

Is there any other information in the log? Such as if a graph was generated or not?

That lead to the answer–
Collecting Meshes
Some meshes were statically batched. These meshes can not be used for navmesh calculation due to technical constraints.
During runtime scripts cannot access the data of meshes which have been statically batched.
One way to solve this problem is to use cached startup (Save & Load tab in the inspector) to only calculate the graph when the game is not playing.
AstarPath:ScanLoop(OnScanStatus)
AstarPath:Awake()

Turns out I had a lot of stuff set to Static in my level from when I previously needed to bake navmeshes. So I just unchecked them off Static and it worked perfectly.

Thanks for pointing me in the right direction! Apart from this little hiccup, loving the system so far!

1 Like