x


Docking EditorWindow

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.

more ▼

asked May 03 '10 at 05:47 PM

Raphael gravatar image

Raphael
102 8 8 14

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

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.

more ▼

answered Apr 06 '11 at 04:24 PM

Semut gravatar image

Semut
95 3 4 12

Hey Semut. I'd need to merge and EditorWindow with another one, as you said it can be done. Could you write how it is done, I can't find it anywhere :)

Oct 28 '11 at 01:05 PM Izitmee

Any word on how to merge or dock this?

Oct 06 '12 at 08:53 PM ianjosephfischer
(comments are locked)
10|3000 characters needed characters left

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));

more ▼

answered Oct 07 '12 at 06:21 PM

ianjosephfischer gravatar image

ianjosephfischer
31 2

Awesome! Don't know if we were all blind not to notice that overload until now, or if it was added lately. Thanks :)

Oct 08 '12 at 09:14 AM Izitmee
(comments are locked)
10|3000 characters needed characters left

I know this is old, but if anyone else comes here looking for an answer, docking can be done by dragging the editor window tab, rather than the body of the window.

more ▼

answered Apr 21 at 03:04 PM

karenkrane gravatar image

karenkrane
3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x348
x170

asked: May 03 '10 at 05:47 PM

Seen: 1602 times

Last Updated: Apr 21 at 03:04 PM