Skip to content

[ContextMenu] to inspector button #51

@fight4dream

Description

@fight4dream

Feature request

draw a button for method decorated with [ContextMenu]

Example

The following would draw a button with face text “Do transform”.
When pressed it will call DoTransform().
If its validating method returns false, the button is greyed out and not interactable.

[ContextMenu(Do transform)]
public void DoTransform()
{
    // ...
}

[ContextMenu(Do transform, validate: true)]
private bool IsPlaying()
{
    return Application.isPlaying;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions