A* Pathfinding Project

Not allowed to access vertices on mesh


#1

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)
UnityEngine.Mesh:SetVertices(List`1)
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


#2

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

I cannot replicate this in Unity 2020.


#3

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.


#4

Hi

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.


#5

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


#6

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


#7

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


#8

Thank you very much aron, it’s fixed


#9

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.