> 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="/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
