Errors when selecting gameobject with AStarPath attached when heuristic optimization is RandomSpreadOut

Unity 2022.3.10f
Astar 5.1.6 Pro
In Editor, not playmode.

When selecting the gameobject that the AStarPath component is on in an empty scene lots of errors messages are thrown when the Advanced > Heuristic Optimization setting is set to RandomSpreadOut. It doesn’t seem to happen for the other settings and when first setting it to a different setting first it also doesn’t seem to happen.

Steps to reproduce:

  1. Create empty scene
  2. Create GO and attach AStarPath component
  3. Set Heuristic Optimization to RandomSpreadOut.
  4. Deselect and select GO.

Hey there,

I followed your instructions and saw the error. However upon installing A* into this project, there’s a warning that pops in the console:

This version of Unity has a bug which causes components in the A* Pathfinding Project to randomly stop working. Please update to unity 2022.3.21 or later.

That didn’t stop the console errors however, and I also experienced them up to even the latest, 2023.3.42. I’d still recommend updating at least to .21 however. Tagging @aron_granberg to read this though- I’ve seen the errors he’s referring to on all versions of 2023.3 tested, however I may have also misconfigured RandomSpreadOut, as well.

1 Like

@Yannic Thanks. I’ll include a fix in the next update.

1 Like