static function GetWindow (t : System.Type, utility : bool = false, title : string = null, focus : bool = true) : EditorWindow
Description描述
Returns the first EditorWindow of type t which is currently on the screen.
返回屏幕上类型t的当前的第一个编辑器窗口。
If there is none, creates and shows new window and returns the instance of it.
如果没有,创建并显示新的窗口并返回它的实例。
Simple Empty non-dockable window.
简单的空的非停靠窗口。
// Simple script that creates a new non-dockable window
//创建一个新的非停靠窗口
import UnityEditor;
class GetWindowEx extends EditorWindow {
@MenuItem("Example/Display simple Window")
static function Initialize() {
var window : GetWindowEx = EditorWindow.GetWindow(GetWindowEx, true, "My Empty Window");
}
}