x


Resizable windows inside a customized EditorWindow

Hi!

I am trying to create a customized editor window. Inside the editor I want to put a canvas for drawing some elements, and some properties windows, lists etc. I would like to use the editor window with some splitter elements to add other windows, just to be resizable. I know there isn't splitter object in Unity for that, but I have seen some third party apps for unity that use them. Is this possible? http://imgur.com/2Qd1z

Thank you!

more ▼

asked Apr 18 '12 at 10:39 AM

iparra gravatar image

iparra
1 1 1 1

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

1 answer: sort oldest

Just create seperate windows. EditorWindows can be docked like any other window in Unity. That way the user can arrange everything like he want.

You can of cource create your own "splitter" GUI control, but it depends on what kind of GUI you're using. GUILayout would be difficult since everything is autopositioned. To create your own splitter all you should need is the Event class to process mouseevents.

If you use GUILayout the best thing would be to out each "area" into it's own GUILayout.BeginArea - block and do the positioning yourself.

edit

If you need only a "simple" split in GUILayout it's better to use GUILayout.Width / .Height to set a fix width / height on a group according to your splitter position.

more ▼

answered Apr 18 '12 at 10:48 AM

Bunny83 gravatar image

Bunny83
45.3k 11 49 207

I was trying with GUILayout.BeginWindows, and putting some windows there. I will try your suggestions. Thanks Bunny83!

Apr 18 '12 at 01:17 PM iparra
(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:

x201
x169
x80

asked: Apr 18 '12 at 10:39 AM

Seen: 726 times

Last Updated: Apr 18 '12 at 03:18 PM