A* Pathfinding Project

Not allowed to access vertices on mesh


Hi, I just started using this library few days ago, everything seemed ok

I installed the latest unity 2019.3.2f1 and I started receiving this error with every OnDrawGizmos call

Not allowed to access vertices on mesh ‘’ (isReadable is false; Read/Write must be enabled in import settings)
Pathfinding.Util.Builder:SubmitLines(RetainedGizmos, UInt64) (at Assets/Libraries/AstarPathfinding/Utilities/RetainedGizmos.cs:205)
Pathfinding.Util.Builder:Submit(RetainedGizmos, Hasher) (at Assets/Libraries/AstarPathfinding/Utilities/RetainedGizmos.cs:132)
Pathfinding.Util.GraphGizmoHelper:Submit() (at Assets/Libraries/AstarPathfinding/Utilities/GraphGizmoHelper.cs:154)
Pathfinding.Util.GraphGizmoHelper:System.IDisposable.Dispose() (at Assets/Libraries/AstarPathfinding/Utilities/GraphGizmoHelper.cs:160)
Pathfinding.GridGraph:OnDrawGizmos(RetainedGizmos, Boolean) (at Assets/Libraries/AstarPathfinding/Generators/GridGenerator.cs:1503)
AstarPath:OnDrawGizmos() (at Assets/Libraries/AstarPathfinding/Core/AstarPath.cs:795)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This happens in completely empty scene with nothing in it other than camera

the moment I add PathFinder script and generate a grid graph they start firing up

I’m using the latest version of Unity and the pathfinding library, and I’m using 2D


That’s odd.
Is this happening in an empty project in the example scenes?

I cannot replicate this in Unity 2020.


I’m having this exact same issue, I also just updated to 2019.3.2f1.

I don’t have any meshes in my scene since I’m also using 2D and all the models in the assets folder are set to read/write.



Do you think you could try to replace your RetainedGizmos.cs script with this: https://pastebin.com/ZLCCt7C1. Let me know if that resolves the issue.


Yeah, that fixed it for me atleast! Thank you.


Ok. I will release an update that fixes this soon.


I have now uploaded version 4.2.12 (https://www.arongranberg.com/astar/download) which fixes this issue.


Thank you very much aron, it’s fixed


I am getting the same error with unity 2019.3.4f1, and A* Pathfinding Project Pro 4.3.10 from the assetstore. But replacing RetainedGizmos.cs with the pastebin fixed it.