Most Editor controls appear in default windows and can be docked in the main app window. Windows usually perform two principal functions:
Window types found in the editor:
A default window with a tab and dock:
A window using popup-style framing:
A window using popup-style framing:
A single instance auxiliary window:
A persistent modal window:
A persistent modal window:
Dialogs are modal windows rendered by the operating system:
A default window with a tab and tab well with the window menu.
This window can be docked in tab docks to customize the environment and discreetly stack windows and panels contextually.
When released anywhere on the Editor, it will undock as a modal with a title bar and OS window controls.
The window is styled in the same way as a PopupWindow. This means the window is automatically closed when it loses focus and the window has no frame around the edge.
Note this function auto-fits the window to the screen while trying to place it first below then above the button it was triggered from. This means the windowSize might change when fitting it to the screen, so make sure to read the 'position' afterward to check whether the size was cropped.
Shows an Editor window using popup-style framing. This means the window has no frame, and is not draggable. It is intended for showing something like a popup menu within an existing window.
The single auxiliary window can be re-used by different editor windows at different times. Showing an editor window in the auxiliary window can be useful to avoid clutter of many small windows.
A persistent modal window. Other windows will not be accessible and any script recompilation will not happen until this window is closed.
When the utility window loses focus it remains on top of the new active window. This means the utility window is never hidden by the Unity Editor. It will be hidden when the user switches from Unity to another application.
Dialogs are messages that present a short-term task the user must perform to continue the operation. Users won't be able to interact with the Editor until the dialog is closed.
A Unity Editor window body displays Editor content and allows user to interact with its contents. When floating, a Unity window is framed by the operating systems window element and a title bar.
It often consists of:
Most editor windows can be resized whether they are docked or floating. maxSize and minSize variables are used to provide the largest and smallest width and height that is supported.
Custom Editor windows allow you to extend Unity by implementing your own editors and workflows.
Follow the guidance below that covers: