Issue: errors in upgrading to Pro

I have upgraded to Pro, and I have the following errors visible now. I have tried deleting astarproject folder and reimporting. Any advice?

Assets\AstarPathfindingProject\Editor\GraphEditors\LayerGridGraphEditor.cs(6,38): error CS0246: The type or namespace name ‘GridGraphEditor’ could not be found (are you missing a using directive or an assembly reference?)

Assets\AstarPathfindingProject\Editor\GraphEditors\LayerGridGraphEditor.cs(5,3): error CS0246: The type or namespace name ‘CustomGraphEditorAttribute’ could not be found (are you missing a using directive or an assembly reference?)

Assets\AstarPathfindingProject\Editor\GraphEditors\LayerGridGraphEditor.cs(5,3): error CS0246: The type or namespace name ‘CustomGraphEditor’ could not be found (are you missing a using directive or an assembly reference?)

Assets\AstarPathfindingProject\Editor\GraphEditors\LayerGridGraphEditor.cs(7,24): error CS0115: ‘LayerGridGraphEditor.OnInspectorGUI(NavGraph)’: no suitable method found to override

Assets\AstarPathfindingProject\Editor\GraphEditors\RecastGraphEditor.cs(7,35): error CS0246: The type or namespace name ‘GraphEditor’ could not be found (are you missing a using directive or an assembly reference?)

Note: There are actually several CS0115 errors and CS0246 errors which I have not copied. I suspect theyre the result of the first errors.

Hi

That’s very strange. Does this happen in an empty project as well?

I have solved the issue. I had an AstarEditorProject folder on the same level of file folder hierarchy as AstarPathfindingProject, which was not overwritten by Unity’s Import function. I believe the AstarEditorProject folder is some ancient remains of the earlier versions of Astar which I have used. Solution was to delete both folders and import again.

I have met another minor issue though. When I click the A* Pathfinder script’s Draw Gizmos button (which is red for some reason now) the grid that used to be drawn does not appear at all in Editor mode, and is just a pink blob in Play mode, and I get the following error message doing it in Play mode:

Shader error in ‘Hidden/AstarPathfindingProject/Navmesh Outline’: failed to open source file: ‘Navmesh.cginc’ at line 36 (on d3d11)

It is given 4 times, with lines 36, 81, 20, 57.

Actually, it is an important issue as I have no way of correctly sizing, positioning or debugging my A* now.

Hmm, it still seems like your import is corrupt. Do you have a Navmesh.cginc file (or NavmeshOutline.cginc) somewhere else in the project?

I found Navmesh.cginc file in Assets/AstarPathfindingProject/Editor/EditorAssets/Materials.
There are no other Navmesh.cginc files.

There is no NavmeshOutline.cginc.

I’m not sure what’s going on here. Any other cgincg or .shader files in your project that might be leftovers?

Solved. I just had to click Reimport in the editor on the .shader files.

Not sure why it did not import correctly to begin with.

It works now. Thank you for your help.

As a final side note, which may help others, my Procamera2D had a file in the Examples called Navmesh.asset, which I deleted as well, which may have interfered somehow (probably not).

1 Like