Event.commandName 命令名称
var commandName : string
Description描述
The name of an ExecuteCommand or ValidateCommand Event
ExecuteCommand或ValidateCommand事件的名字。
"Copy", "Cut", "Paste", "Delete", "FrameSelected", "Duplicate", "SelectAll" and so on. Sent only in the editor.
"Copy","Cut","Paste","Delete","FrameSelected", "Duplicate", "SelectAll"等等,仅在编辑器发送。
// Detects commands executed and prints them.
//检测执行的命令,并打印
function OnGUI() {
var e : Event = Event.current;
if(e.commandName != "") {
Debug.Log("Command recognized: " + e.commandName);
}
}
最后修改:2010年12月31日 Friday 16:36