Custom graph errors - graph disappears from inspector

Hi,

I’ve created a custom graph generator which works the way I want it to, but the problem is it disappears from inspector quite frequently. This is usually after I exit play mode or load the scene. The graph is slightly modified grid graph, as is the editor for it.

Here are few errors in the log that might be associated with this. Can anyone figure out just from these where I am going wrong? Probably just missing something quite simple here :smile:

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,CustomGraphEditor].Add (System.String key, .CustomGraphEditor value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
AstarPathEditor.FindGraphTypes () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:2605)
AstarPathEditor.OnEnable () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:216)

NullReferenceException: Object reference not set to an instance of an object
System.Version.op_GreaterThan (System.Version v1, System.Version v2) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Version.cs:302)
AstarPathEditor.DrawAboutArea () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:1062)
AstarPathEditor.DrawMainArea () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:932)
AstarPathEditor.OnInspectorGUI () (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:453)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1150)
UnityEditor.DockArea:OnGUI()

Unexpected top level layout group! Missing GUILayout.EndScrollView/EndVertical/EndHorizontal?
UnityEditor.DockArea:OnGUI()

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)

Still struggling with this, anyone have any insight on where I should start looking for the solution?

Hi

It looks like you might have two editors for the same type of graph?
Check the CustomGraphInspector attributes at the top of the file containing the editor and see if there are any duplicates.