执行特殊命令(例如复制和粘贴)。
"复制"、"剪切"、"粘贴"、"删除"、"FrameSelected"、"复制"、"全选"等等。仅在编辑器中发送。例如,检查某个框架是否具有焦点。
using UnityEngine;
public class Example : MonoBehaviour { void OnGUI() { //implement frame selection Event e = Event.current; if (e.type == EventType.ExecuteCommand || e.type == EventType.ValidateCommand) { if (Event.current.commandName == "FrameSelected") Debug.Log("frame selected"); } } }