Can EditorWindows dynamically display interfaces of other Editor Windows ?

For example , we create an editor window named DisplayWindow which displays 3 buttons inside it.
the buttons are
Inspector button
Hierarchy button
Scene button

How can we make it so that when we click the Heirachy button , DisplayWindow repaints to display the Heirachy editor window interface ?

when we click the Inspector button , DisplayWindow repaints to display the inspector editor window interface …etc

Can this be done ? , if it can , then should it be done or is it just going to be slow and taxing on the CPU?

Or should I just pool everything into one script and just make a GUI interface from which i can cycle through the different GUI interfaces ?

You can put all the lines of code that create the window display in a single public function, then you can call that function from within the DisplayWindow OnGUI() and from the specific window OnGUI(), and they will all draw the same thing.

// HierarcyEditor
private void OnGUI() {

public static void DrawWindow() {
    // layout stuff goes here

// Display Window
private bool displayHierarchy = false;

private void OnGUI() {
    if (GUILayout.Button("Hierarchy")) {
        displayHierarch = true;

    if (displayHierarchy) {

That’s the idea, you’ll need to tweak the script for your exact needs.