> For the complete documentation index, see [llms.txt](https://tools.continis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tools.continis.io/black-box/main-features/reveal/properties/unityevents-as-buttons.md).

# UnityEvents as buttons

While you can reveal `UnityEvent` type properties just [like any other](/black-box/main-features/reveal.md), you can also decide to reveal them as a button, very much like you can do [with methods](/black-box/main-features/reveal/methods.md).

However, revealing a `UnityEvent` as a button allows you to specify one argument for each method invoked, and to invoke multiple methods at once (which is exactly what `UnityEvent` supports), making it a much more powerful tool.

## Revealing a UnityEvent as a button

If a `UnityEvent` property is revealed, by default it will just show with its regular UI:

<figure><img src="https://3055962393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzOOVmLdEeVhfPmrcckJe%2Fuploads%2F0P5TAnTgkEkk3OhUnk1g%2FRegularEvent.png?alt=media&amp;token=2fcf0edb-856d-4719-addf-fc8dec5581ba" alt="" width="563"><figcaption><p>A revealed UnityEvent</p></figcaption></figure>

To display it as a button, the property needs to be decorated with a `[RevealEventAsButton]` attribute, like this:

```csharp
[RevealEventAsAttribute] public UnityEvent _certainConditionEvent;
```

Once the code compiles, the `UnityEvent` will now show up as a button:

<figure><img src="https://3055962393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzOOVmLdEeVhfPmrcckJe%2Fuploads%2Fo3GZRJOgxUV8ZrPDFitS%2FEvent_AsButton.png?alt=media&amp;token=44a92b97-cb88-4742-8b06-a2b26fe57ee1" alt="" width="563"><figcaption><p>The same UnityEvent now displayed as a button</p></figcaption></figure>

{% hint style="info" %}
If the `UnityEvent` has no callbacks setup, the button will show up as disabled.
{% endhint %}
