OnGUI() isn’t being called in (Odin)EditorWindows when they are part of a OdinMenuEditorWindow

Issue #641 wontfix
Alexander Müller created an issue

1. What happened?

OnGUI() isn’t being called in (Odin)EditorWindows when they are part of a OdinMenuEditorWindow

2. How can we reproduce it?

Create an OdinEditorWindow with functionality in OnGUI(), add it to a OdinMenuEditorWindow. The content doesn’t show up, however when opening the OdinEditorWIndow directly it does.

(Debugging the issues reveals that OnGUI() isn’t being called)

3. If screenshots would help explain or demonstrate your issue, please include these.

Same window, left side is the window itself, right side is an OdinMenuEditorWindow with a reference to the editor window in the tree.

4. What version of Unity are you using?


5. What version of Odin are you using? (See "Tools > Odin Inspector > About")


6. Do you have Editor Only mode enabled?


7. What operating system are you on?

Windows 10

Comments (1)

  1. Tor Esa Vestergaard

    I'm afraid Unity's EditorWindows are not made to be "inlineable" - as such, this is a not a pattern Odin can or will support, as any implementation would be extremely hacky and rely on internal Unity quirks and behaviour that is different from version to version and, even if we could make it work across all supported versions of Unity, would doubtless break in almost every single new Unity version release going forward.

    As such, we recommend that your window consists fully of an inlined inspector of a ScriptableObject or some other thing like that, that you can also inspect everywhere else - that will let you "simulate" the window being drawn elsewhere.

  2. Log in to comment