EditorWindow
- autoRepaintOnSceneChange
- BeginWindows
- Close
- EndWindows
- focusedWindow
- FocusWindowIfItsOpen.<T>
- FocusWindowIfItsOpen
- Focus
- GetWindow.<T>
- GetWindowWithRect.<T>
- GetWindowWithRect
- GetWindow
- mouseOverWindow
- OnDestroy
- OnFocus
- OnGUI
- OnHierarchyChange
- OnInspectorUpdate
- OnLostFocus
- OnProjectChange
- OnSelectionChange
- position
- RemoveNotification
- Repaint
- SendEvent
- ShowAuxWindow
- ShowNotification
- ShowPopup
- ShowTab
- ShowUtility
- Show
- Update
- wantsMouseMove
EditorWindow.GetWindow 获取窗口
static function GetWindow (t : System.Type, utility : bool = false, title : string = null, focus : bool = true) : EditorWindow
Parameters参数
-
tthe type of the window. Must derive from EditorWindow.
窗口的类型,必须源于编辑器窗口 -
utilityset this to true, to create a floating utility window, false to create a normal window.
设置为真,来创建一个浮动窗口;为假,创建一个标准窗口。 -
titleif GetWindow creates a new window, it will get this title. If this value is null, use the class name as title.
如果GetWindow创建一个新的窗口,它将获取这个标题。如果这个值为null,使用类名作为标题。
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");
}
}
最后修改:2011年6月24日 Friday 15:56