Version: 2023.2

ShortcutAttribute

class in UnityEditor.ShortcutManagement

/

继承自:ShortcutManagement.ShortcutBaseAttribute

切换到手册

描述

Registers a static method as the action for an action shortcut.

An action shortcut triggers when the binding for the shortcut is pressed down. The method that this attribute is placed on must either take no arguments or take a single argument of type ShortcutArguments.

You can bind a ClutchShortcutAttribute and a ShortcutAttribute to the same mouse button. In this case, the action shortcut triggers when the mouse button is released.

变量

displayName在配置界面中列出快捷方式时,快捷方式 ID 的可选覆盖。

构造函数

ShortcutAttribute使用 ID、可选上下文和可选默认绑定为操作快捷方式 创建属性。

继承的成员