docs.unity3d.com
    目次を表示する/隠す

    Class BrushShortcutHandler<TKey>

    Provides methods for handling brush shortcuts.

    Inheritance
    Object
    BrushShortcutHandler<TKey>
    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 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 ShortcutArguments changes when using shortcuts.

    Declaration
    public void HandleShortcutChanged(ShortcutArguments args, TKey key)
    Parameters
    Type Name Description
    ShortcutArguments args

    The data for shortcut action methods invoked by the shortcut system.

    TKey key

    The type to check.

    Remarks

    This method handles the invocation of a shortcuts on press and release actions using ShortcutArguments.

    See Also
    TerrainToolShortcutContext
    ClutchShortcutAttribute

    IsShortcutPressed(TKey)

    Determines whether the key is pressed.

    Declaration
    public bool IsShortcutPressed(TKey key)
    Parameters
    Type Name Description
    TKey key

    The type to check.

    Returns
    Type Description
    Boolean

    Returns true when the key is currently pressed. Otherwise, returns false.

    RemoveActions(TKey)

    Unsubscribes the key from its press and release actions.

    Declaration
    public void RemoveActions(TKey key)
    Parameters
    Type Name Description
    TKey key

    The type to remove.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)