ExtendRealityLtd / ExtendRealityLtd/Malimbe

[ContextMenu] to inspector button

Open
#51 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
52
Forks
10
PR merge metrics
No merged PRs in 30d

Description

### 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.

```c#
[ContextMenu(“Do transform”)]
public void DoTransform()
{
// ...
}

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.