Unity - Scripting API: IShortcutManager

interface in UnityEditor.ShortcutManagement

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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.

Properties

Property Description
activeProfileIdGets or sets the ID of the currently active profile.