- Home /
Hierarchy not showing anything, getting KeyNotFoundException
My Unity project seems seriously buggered.
My scene is loaded but my hierarchy is empty. It does this in EVERY scene, not just one. It looks like this:
I'm getting tons of errors, but the one one that is repeating is this:
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,UnityEditor.BaseHierarchySort].get_Item (System.String key) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
UnityEditor.SceneHierarchyWindow.SortMethodsDropDown () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:645)
UnityEditor.SceneHierarchyWindow.DoToolbar () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:560)
UnityEditor.SceneHierarchyWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:318)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
And I'm occasionally getting this one too:
ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext ()
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
UnityEditor.SceneHierarchyWindow.DoToolbar () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:513)
UnityEditor.SceneHierarchyWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:318)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
I suspect it's an Editor class or something that's gone out of whack - but can anyone help me understand the error and get to the bottom of it?
Cheers!
Answer by drewnusser · Jul 18, 2016 at 06:15 AM
I was running into the exact same problem and finally got it fixed thanks to Bonfire Boy's answer here.
Reimporting all assets did it for me (Assets > Reimport All).
Hopefully this helps.
Your answer
Follow this Question
Related Questions
Engine Language Changed 0 Answers
Editor Window stuck on a blank white screen 2 Answers
black screen over project window 0 Answers
Unity Editor's Inspector Glitch while using OnGUI function 0 Answers
Stop Editor From Crashing 1 Answer