Odin drawers not automatically loading in Unity 2018.3.x

Issue #493 resolved
Mike K created an issue

The Odin drawers are not automatically loading in the Inspector upon first opening my Unity 2018.3.x project like they used to in previous versions. I get all of the default Unity drawers.

I have to go into the Odin Preferences which then seems to force-load the Odin drawers and then I'm good to go. But it would be nice if they loaded on opening the Unity Editor again!

I've tried completely deleting out Odin from my project, and also from the Unity asset download cache. Re-downloaded the Odin Inspector asset again from within the Unity 2018.3 editor, imported it back in, but there was no change, it still does not load the drawers automatically.

Comments (1)

  1. Tor Esa Vestergaard

    It was determined via dialogue with the reporter on Discord that another plugin was interfering with Odin's efforts to load itself. A fix for this sort of case will be in an upcoming release; meanwhile, other people who experience this issue can add the following code to an editor script to resolve the issue:

    using UnityEditor;
    using Sirenix.OdinInspector.Editor;
    
    [InitializeOnLoad]
    internal static class LoadOdinAndIReallyMeanIt
    {
        static LoadOdinAndIReallyMeanIt()
        {
            if (InspectorConfig.HasInstanceLoaded)
            {
                InspectorConfig.Instance.UpdateOdinEditors();
            }
            else
            {
                UnityEditorEventUtility.DelayAction(() => InspectorConfig.Instance.UpdateOdinEditors());
            }
        }
    }
    
  2. Log in to comment