EditorWindow.GetWindow 获取窗口

static function GetWindow (t : System.Type, utility : bool = false, title : string = null, focus : bool = true) : EditorWindow

Parameters参数

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.

如果没有,创建并显示新的窗口并返回它的实例。

EditorWindow.GetWindow 获取窗口

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");
	}
}
Page last updated: 2011-6-24