Unable to open preferences window

Issue #116 resolved
Henrik Bergvin
created an issue

Tested on a blank project, installed via the Asset Store, Unity 5.6.1f1.
If I go to Edit->Preferences->Odin Inspector and press "Show Odin Preferences", I get the following errors:

NullReferenceException: Object reference not set to an instance of an object
Sirenix.OdinInspector.Editor.SirenixPreferencesWindow.BuildMenuTree () (at C:/Users/Bjarke/Desktop/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/SirenixPreferencesWindow.cs:229)
Sirenix.OdinInspector.Editor.SirenixPreferencesWindow.DrawLeftMenu () (at C:/Users/Bjarke/Desktop/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/SirenixPreferencesWindow.cs:250)
Sirenix.OdinInspector.Editor.SirenixPreferencesWindow.OnGUI () (at C:/Users/Bjarke/Desktop/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/SirenixPreferencesWindow.cs:83)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

and

ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Aborting
UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/LayoutGroup.cs:115)
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:299)
UnityEditor.EditorGUILayout.BeginScrollView (Vector2 scrollPosition, Boolean alwaysShowHorizontal, Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7404)
UnityEditor.EditorGUILayout.BeginScrollView (Vector2 scrollPosition, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7363)
Sirenix.OdinInspector.Editor.SirenixPreferencesWindow.DrawLeftMenu () (at C:/Users/Bjarke/Desktop/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/SirenixPreferencesWindow.cs:259)
Sirenix.OdinInspector.Editor.SirenixPreferencesWindow.OnGUI () (at C:/Users/Bjarke/Desktop/Projects/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/SirenixPreferencesWindow.cs:83)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Comments (9)

  1. mSkull001
    • changed status to open

    Hi, thanks for reporting this.

    We're currently investigating this. For now, you should be able to get to the preferences through Window > Odin Inspector > Preferences.

  2. mSkull001

    Unfortunately we've been unable to reproduce this error. What if you access the config files directly? Can you edit them in the inspector, or are you still getting errors?

    You'll find them under Plugins > Sirenix > Odin Inspector > Config.

  3. Henrik Bergvin reporter

    Yes, I have three files there, "ColorPaletteManager", "GeneralDrawerConfig", "InspectorConfig". They are in Plugins>Sirenix>Odin Inspecto>Config>Editor. They're directly editable.

  4. Bjarke Elias Clauson-Kaas ├śrrild

    Nothing should be null on that line. ­čśÂ

    Try going to "Edit > Project Settings > Editor" and set the "Asset Serialization Mode" to "Force Text", and re-import. If that works then I have a good idea of what could be the problem.

    But regardless, I think we are just going to rewrite the window and add support for defining menu item ordering which we have been wanting for some time anyway.

  5. Log in to comment