Essential Attributes [Button]
Add clickable buttons to the Inspector to invoke any method — including those with parameters and return values.
by Foxal Face
Price History +
The [Button] attribute allows you to execute any method (even private) directly from the Unity Inspector by drawing a clean, context-aware button that adapts to the method it targets.
Unlike simple solutions that only support parameterless methods, [Button] handles:
- Methods with parameters (editable directly in the Inspector)
- Return values (displayed in the Inspector)
- Tooltip generation from XML documentation
- Editor/runtime mode filtering
- Persistent parameter memory
- Method grouping under a unified “Methods” foldout
This makes it a powerful productivity tool for testing, debugging, or automating workflows — without writing any custom editor code.
Everything is designed to blend seamlessly with Unity's native UI.
💡 Try Before You Buy
This attribute is also included in the Essential Attributes asset — or try [ElementName]and [TexturePreview] for free on the Unity Asset Store.