static var focusedWindow : EditorWindow
Description描述
The EditorWindow which currently has keyboard focus (Read Only)
当前的哪一个编辑器窗口具有键盘焦点(只读)。
/focusedWindow/ can be null if no window has focus.
如果没有窗口具有焦点,focusedWindow可以为null。
参见: mouseOverWindow, Focus.
Focus other windows with a mouse click.
用鼠标点击焦点另一个窗口。
// Prints to a label the name of the focused window
//具有焦点窗口的名字,打印到标签
class focusedWindowEx extends EditorWindow {
@MenuItem("Example/Print Focused Window Name")
static function Init() {
var window = GetWindow(focusedWindowEx);
window.Show();
}
function OnGUI () {
GUILayout.Label(EditorWindow.focusedWindow.ToString());
}
}