"The NativeReference is already disposed" error on AstarPath

For some reason I keep getting “ObjectDisposedException: Cannot access a disposed object.
Object name: ‘The NativeReference is already disposed.’.” on my A* game object.
The object has nothing beside the AstarPath script, and there are no objects actually using the pathfinding on scene.

My settings are as so:

  • A* version: 5.3.6
  • Unity version: 2022.3.62f1

Hi

Try upgrading your version of the unity collections package to a more recent version. That will resolve the issue.