# 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="/files/I1CukWJYzI2KFUZsMO3n" 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="/files/ig5ocs3GTWeHjdTxXcrs" 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tools.continis.io/black-box/main-features/reveal/properties/unityevents-as-buttons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
