Version: 2021.3
언어: 한국어

IShortcutManager

interface in UnityEditor.ShortcutManagement

매뉴얼로 전환

설명

Represents a manager that configures a particular instance of the shortcuts system.

The manager maintains a list of available profiles which can be retrieved with GetAvailableProfiles. Some of the methods require the passed profile ID to be available at the time it is called. Creating a new profile with CreateProfile makes it available and deleting a profile with DeleteProfile makes it not available anymore.

It also maintains a reference to the active profile (activeProfileId) which determines the active bindings based on the shortcut overrides of the active profile. RebindShortcut and ClearShortcutOverride requires the active profile to not be read-only (i.e. IsProfileReadOnly returns false for activeProfileId) since these two methods modify the active profile.

Finally, it maintains a list of available shortcuts which can be retrieved with GetAvailableShortcuts. All methods that take a shortcut ID require that the shortcut is avaliable.

변수

activeProfileIdGets or sets the ID of the currently active profile.

Public 함수

ClearShortcutOverrideClears the binding for shortcut with given shortcut ID from the active profile.
CreateProfileCreates a new profile with the given profile ID.
DeleteProfileDeletes profile with the given profile ID.
GetAvailableProfileIdsReturns an enumeration of all of avaliable profile IDs.
GetAvailableShortcutIdsReturns an enumeration of all available shortcut IDs.
GetShortcutBindingReturns the active binding for the given shortcut ID.
IsProfileIdValidChecks that the profile ID is valid.
IsProfileReadOnlyIs the profile for the given profile ID read-only?
IsShortcutOverriddenDoes the active profile override the binding for the given shortcut ID?
RebindShortcutRebinds the shortcut for the given shortcut ID to the given binding in the active profile.
RenameProfileRenames the ID of a profile.

Events

activeProfileChangedRaised when the ID of the active profile is changed.
shortcutBindingChangedRaised when shortcut overrides are changed on the active profile.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961