Class BrushShortcutHandler<TKey>
Provides methods for handling brush shortcuts.
Inherited Members
Namespace: UnityEditor .TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
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 TKey type to add. |
Action | onPressed | The Action to call on key press. |
Action | onReleased | The Action to call on key release. |
HandleShortcutChanged(ShortcutArguments, TKey)
Handles Shortcut
Declaration
public void HandleShortcutChanged(ShortcutArguments args, TKey key)
Parameters
Type | Name | Description |
---|---|---|
Shortcut |
args | The data for shortcut action methods invoked by the shortcut system. |
TKey | key | The TKey type to check. |
Remarks
This method handles the invocation of a shortcuts on press and release actions using Shortcut
See Also
IsShortcutPressed(TKey)
Determines whether the key is pressed.
Declaration
public bool IsShortcutPressed(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The TKey type to check. |
Returns
Type | Description |
---|---|
bool | 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 TKey type to remove. |