- Home /
 
 
               Question by 
               vib · Jan 08, 2013 at 11:58 PM · 
                windowseditorwindowmultiplecreating  
              
 
              Docking Windows using EditorWindow
Hi,
I am new to unity and am trying to figure out how to make a window have sub-windows that are docked.
I have a MainWindow class that calls two other EditorWindow classes (Events, Banks):
MainWindow Class:
 using UnityEditor;
 using UnityEngine;
 
 public class MainWindow : EditorWindow {
 
     void OnGUI()
     {
     }
 
     //Add menu item named "My Window" to the window menu
     [MenuItem("MIG/AudioTool")]
     public static void Init()
     {
         //Show existing window instance. If one doesn't exist, make one.        
         MainWindow.GetWindowWithRect<MainWindow>(new Rect(Screen.width/2 - 300, Screen.height/2 - 300, 1024,768));
         Events eventsWindow = (Events)EditorWindow.GetWindow(typeof(Events));
         Banks banksWindow = (Banks)EditorWindow.GetWindow(typeof(Banks));    
     }
 }//end class
 
               Events Class:
 using UnityEditor;
 using UnityEngine;
 public class Events : EditorWindow {
 }
 
               Banks Class:
 using UnityEditor;
 using UnityEngine;
 public class Banks : EditorWindow {
 }
 
               This is what i get: ![alt text][1]
This is what i want with the sidebars adjustable: ![alt text][2]
Appreciate any feedback, Thanks [1]: /storage/temp/6504-screen+shot+2013-01-08+at+5.40.23+pm.png [2]: /storage/temp/6505-screen+shot+2013-01-08+at+5.40.56+pm.png
 
                 
                screen shot 2013-01-08 at 5.40.23 pm.png 
                (64.0 kB) 
               
 
                
                 
                screen shot 2013-01-08 at 5.40.56 pm.png 
                (30.6 kB) 
               
 
              
               Comment
              
 
               
              Your answer