var position : Rect
Description描述
The position of the window in screen space.
窗口在屏幕空间的位置。
Setting this value will undock the window if it's docked
如果是停靠的,设置这个值将解除窗口停靠。
Create an empty editor window of 200x200px.
创建一个空的200x200px编辑器窗口。
// Create an empty editor window of 200x200 pixels size
// located at the top left corner
//创建一个空的200x200px编辑器窗口。
//位于左上角
class EditorWindowPosition extends EditorWindow {
@MenuItem ("Example/Window position usage")
static function Init () {
var window = EditorWindow.GetWindow(EditorWindowPosition);
window.position = Rect(0,0, 200,200);
}
}