How do I open editor windows using internal methods?

Opening an editor window as a tab is easy with GetWindow but it won’t allow opening multiple Windows of the same type. Which is what I need.

I am able to get around the issue by creating a new scriptable object instance of the window but I can’t find a way to dock it next to an existing tab this way.

Is there another way to do this? By inspecting the source code of EditorWindow.cs I can see the methods used to specify desiredDockNextTo but they are internal methods and my “reflection-fu” = null

Thank you for reading.

I think you want EditorWindow.CreateInstance

There’s a GetWindow variant that takes that “desiredDockNextTo” parameter array. Though this only provides some rudimentary docking capabilities. To have full control over the docking you would need access to the internal classes (SplitView and others). Some time ago i thought about creating some wrappers for those to be able to arrange tabs the way i want. Though that’s quite a bit of work and in most cases not worth it.