Version: 2023.2
言語: 日本語
public string commandName ;

説明

ExecuteCommand か ValidateCommand イベントの名前を返します

Available commands are:

"Copy", "Cut", "Paste", "Delete", "SoftDelete", "Duplicate", "FrameSelected", "FrameSelectedWithLock", "SelectAll", "Find" and "FocusProjectWindow".

Editor 内のみで送信されます。

Additional resources: 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); } }