Class BrushShortcutHandler<TKey>
Provides methods for handling brush shortcuts.
Namespace: UnityEditor.TerrainTools
Syntax
public class BrushShortcutHandler<TKey>
Type Parameters
Name | Description |
---|---|
TKey | The key type that represents the keyboard key. |
Methods
AddActions(TKey, Action, Action)
Subscribes the key to the passed in press and release Actions.
Declaration
public virtual void AddActions(TKey key, Action onPressed = null, Action onReleased = null)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The |
Action | onPressed | The Action to call on key press. |
Action | onReleased | The Action to call on key release. |
HandleShortcutChanged(ShortcutArguments, TKey)
Handles UnityEditor.ShortcutManagement.ShortcutArguments changes when using shortcuts.
Declaration
public void HandleShortcutChanged(ShortcutArguments args, TKey key)
Parameters
Type | Name | Description |
---|---|---|
UnityEditor.ShortcutManagement.ShortcutArguments | args | The data for shortcut action methods invoked by the shortcut system. |
TKey | key | The |
Remarks
This method handles the invocation of a shortcuts on press and release actions using UnityEditor.ShortcutManagement.ShortcutArguments.
See Also
IsShortcutPressed(TKey)
Determines whether the key is pressed.
Declaration
public bool IsShortcutPressed(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The |
Returns
Type | Description |
---|---|
Boolean | Returns |
RemoveActions(TKey)
Unsubscribes the key from its press and release actions.
Declaration
public void RemoveActions(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The |