function EndWindows () : void
Description
Close a window group started with EditorWindow.BeginWindows

Simple editor Window with a window and a button inside.
class GUIWindowDemo extends EditorWindow {
var windowRect = Rect (100,100,200,200);
function OnGUI () {
BeginWindows ();
windowRect = GUILayout.Window (1, windowRect, DoWindow, "Hi There");
EndWindows ();
}
function DoWindow () {
GUILayout.Button ("Hi");
GUI.DragWindow ();
}
@MenuItem ("Test/GUIWindow Demo")
static function Init () {
EditorWindow.GetWindow (GUIWindowDemo);
}
}
The placement of the BeginWindows / EndWindows pair determines where popup windows will appear; all windows are clipped to the clipping area
defined by GUI.BeginGroup or GUI.BeginScrollview. A small example of that:

Simple editor window with a window and a button inside using scroll bars.
class GUIWindowDemo2 extends EditorWindow {
var windowRect = Rect (100,100,200,200);
var scrollPos = Vector2.zero;
function OnGUI () {
scrollPos = GUI.BeginScrollView (
new Rect (0, 0, position.width, position.height),
scrollPos,
new Rect (0, 0, 1000, 1000)
);
BeginWindows ();
windowRect = GUILayout.Window (1, windowRect, DoWindow, "Hi There");
EndWindows ();
GUI.EndScrollView ();
}
function DoWindow () {
GUILayout.Button ("Hi");
GUI.DragWindow ();
}
@MenuItem ("Test/GUIWindow Demo 2")
static function Init () {
EditorWindow.GetWindow (GUIWindowDemo2);
}
}