Docking Window

Hello there,

I´m new to Unity and have already a question ^^.
I´m trying to create two editor windows through the menu, thats no
problem, but i cannot find a way to dock window a in window b.
is it possible ?

my original idea was that i create a custom sceneview and dock a toolbox into it.

You can pass parameters in GetWindow<>() function this way to get two tab in the same window, ex :

But the problem is that I didn’t found any way to set were to dock this window instead of making a new tab. I hope somebody could give us an answer for this.

I didn’t tried with a custom sceneview, did it worked for you ?

Edit : Another way to do it is to use multiple GUILayout.Window() inside BeginWindows / EndWindows. It’s ok but you’ll probably need to change some code and your two windows won’t be able to be displayed separately.

I needed to dock one of my windows alongside one of the existing editor windows as an extra tab for an extension I was working on, did a search, and came across this old thread. In case someone else happens to find it, I have a solution. Instead of telling Unity to dock your window with a specific window type using:

use EditorWindow.GetWindow<MyNewWindow>("Menu Editor", true, typeof(EditorWindow));

That way your window will be able to dock with anything and everything, including the other built in editor windows like the scene view. However it wont allow you to nest one window inside another, you can only dock them one alongside the other so that they’re both visible at the same time, sharing screen space.