Massive Lag Spikes on Mobile
This scenario happens with any scene with a navmesh. Our game is in 2D. Whenever I click to generate a path around a navmesh on Mobile I get a massive lag spike. I went into the profiler and took a look and this is what I found. A HUGE CPU bottleneck on OverlapCircleAll is happening. Any idea why or what we can do to remedy this? Screenshot below.
Comments
How many vertices does your Polygon Collider have? The speed of the pathfinding calculation is inversely proportional to the number of vertices. If you can, try removing any that aren't strictly necessary.