I’ve never specifically downloaded another version of Json.Net, but I guess it’s possible that something else installed one.
I’m guessing it has something to do with my project being in JS. It doesn’t stop the Unity compiler from running my code, but MonoDevelop always complains (about that and many other things, grr).
I have actually also gotten this error once now. Unfortunately only once, so it is hard to know what the problem is since I cannot replicate it. I think there are some lines in the json library which is causing it.
Hey there… I found a condition that might help you debug this error… It only seems to happen when the GameObject that has the grids is selected - so it might be something in the OnDrawGizmosSelected() or similar function… also would explain why it doesnt seem to actually cause any actual failure in the pathfinding…
I get this error every time I select the object with Astar Path attached and it renders the grid graph:
ArrayTypeMismatchException: Source array type cannot be assigned to destination array type.
Pathfinding.Serialization.AstarSerializer.DeserializeEditorSettings (Pathfinding.GraphEditorBase[] graphEditors) (at Assets/Plugins/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:728)
AstarPathEditor+c__AnonStorey2.<>m__2 (Boolean force) (at Assets/AstarPathfindingEditor/Editor/AstarPathEditor.cs:2282)
AstarPath.ProcessWorkItems (Boolean force) (at Assets/Plugins/AstarPathfindingProject/Core/AstarPath.cs:800)
which points me to this line if I double click it:
reader.PopulateObject (ref graphEditors[i]);
But as previously mentioned it doesn’t seem to affect anything, the AI works fine. If it makes any difference I’m in a 2D project so my grid is on the XY plane.
ArrayTypeMismatchException: Source array type cannot be assigned to destination array type.
Pathfinding.Serialization.AstarSerializer.DeserializeEditorSettings (Pathfinding.GraphEditorBase[] graphEditors) (at Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:787)
AstarPathEditor+c__AnonStorey2.<>m__3 (Boolean force) (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:2391)
AstarPath.ProcessWorkItems (Boolean force) (at Assets/AstarPathfindingProject/Core/AstarPath.cs:812)
i clear cache does not help eventually it starts up again
any idea what is causing it and how it can be resolved…
f u put Debug.Log (entryText); Assets/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs:785 just above where it fails and run it it gives you the following string
All other dependencies which are bundled as .dlls are also open source, you can find the URLs to their repositories by looking in the dependencies.txt file in AstarPathfindingProject/Plugins.