How can i dock my custom EditorWindow automatically when it is called on menu or when the project opens?
Thanks in advance for any idea.
asked May 03 '10 at 05:47 PM
As far I know, it can't be done yet, even in Unity 3.3.0f4
What you can do is create custom (predefined) Unity Layout that already loaded with your custom EditorWindow, and when trying to load the layout, your custom EditorWindow will automatically docked.
At the moment you can called your custom EditorWindow and merge (docked) with another editorwindow.
answered Apr 06 '11 at 04:24 PM
Finally found this out, there is 2 ways to open editor windows.
The first way: static function GetWindow (t : System.Type, utility : boolean = false, title : String = null, focus : boolean = true) : EditorWindow
will look like :
AttachmentEditor editorWindow = (AttachmentEditor)EditorWindow.GetWindow ( typeof(AttachmentEditor), false, "Attachment Editor", true);
The dockable way: static function GetWindow. (title : String, focus : boolean, params desiredDockNextTo : System.Type) : T
Will look like:
AttachmentEditor editorWindow = GetWindow("Attachment Editor", true, typeof(SceneView));