Event.commandName
Declaration
public string commandName;Описание
Имя события ExecuteCommand или ValidateCommand.
Доступны следующие команды:
"Копировать", "Вырезать", "Вставить", "Удалить", "SoftDelete", "Дупликат", "FrameSelected", "FrameSelectedWithLock", "SelectAll", "Найти" и "FocusProjectWindow".
Отправляется только в редакторе.
Дополнительные ресурсы: EventType.ExecuteCommand, EventType.ValidateCommand.
using UnityEngine;
public class EventCmdNameExample : MonoBehaviour { // Detects commands executed and prints them. void OnGUI() { Event e = Event.current;
if (e.commandName != "") Debug.Log("Command recognized: " + e.commandName); } }