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)
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

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.

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.

2 Likes

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

1 Like

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.

2 Likes

Thank you very much aron, it’s fixed

1 Like

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.

Unfortunately I have similar errors and pastebin code does not help to resolve this :confused:

Not allowed to access triangles/indices on mesh ‘Curve’ (isReadable is false; Read/Write must be enabled in import settings)
UnityEngine.Mesh:get_triangles()
Pathfinding.Recast.RecastMeshGatherer:CollectSceneMeshes(List`1) (at Assets/AstarPathfindingProject/Generators/Utilities/RecastMeshGatherer.cs:76)
Pathfinding.RecastGraph:CollectMeshes(Bounds) (at Assets/AstarPathfindingProject/Generators/RecastGenerator.cs:747)
Pathfinding.d__50:MoveNext() (at Assets/AstarPathfindingProject/Generators/RecastGenerator.cs:660)
Pathfinding.d__46:MoveNext() (at Assets/AstarPathfindingProject/Generators/RecastGenerator.cs:583)
d__142:MoveNext() (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1796)
d__141:MoveNext() (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1733)
AstarPath:Scan(NavGraph[]) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1605)
AstarPath:Awake() (at Assets/AstarPathfindingProject/Core/AstarPath.cs:1275)

@Olafs_Osh
Which version are you using?
This was fixed in more recent versions of the package.

2.5.something. Should I get the Beta version?

Hi

It was fixed in 4.2.12 (non-beta version).

Right!
Package Manager says 4.2.15.
The Install button is active, though… Should I… just press it… scary…

In already installed version I have a ChangeLog with 4.2.15, so I must have up to date version.

Reinstalled. Still getting red

errors on vertices and triangles.

That is very strange. You are running in the editor and then the error that you are getting should never happen. Or are you creating the Curve mesh dynamically using a script?

Nope, not creating anything. If anything - the error occurs, when I load the Scene from main menu scene.

Do you think you could post the import settings for the curve object?

Here you go: