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.GetWindowWithRect 获取rect处的窗口
static function GetWindowWithRect (t : System.Type, rect : Rect, utility : bool = false, title : string = null) : EditorWindow
Parameters参数
-
tthe type of the window. Must derive from EditorWindow.
窗口的类型,必须源于编辑器窗口 -
rectthe position on the screen where a newly created window will show.
在屏幕的位置,一个新创建的窗口将被显示 -
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 at the position rect and returns the instance of it.
如果没有,在位置rect创建并显示新的窗口并返回它的实例。
Create an empty 100x150px window at the upper left corner of the screen.
在屏幕的做上角,创建一个空的100x150px的窗口。
// Create a dockable empty window at the top left corner of the screen
// with 100px width and 150px height
//在屏幕的做上角创建一个100x150px可停靠空的窗口
import UnityEditor;
class GetWindowRectEx extends EditorWindow {
@MenuItem("Example/Display simple sized Window")
static function Initialize() {
var window : GetWindowEx =
EditorWindow.GetWindowWithRect(GetWindowRectEx, Rect(0, 0, 100, 150));
}
}
最后修改:2011年6月24日 Friday 16:14