# Methods

In addition to revealing [properties](/black-box/main-features/reveal.md) and [entire components](/black-box/main-features/reveal/entire-components.md), you can visualise buttons on a BlackBox to invoke public, parameter-less methods of any component:

<figure><img src="/files/RdrgKIhv7kMWeGWOYmja" alt="" width="563"><figcaption><p>This Prefab exposes three methods as buttons</p></figcaption></figure>

This can be useful to invoke editor-time functionality directly from a Prefab's root, like baking a Navmesh, randomising the position of children objects programmatically, etc.

## Revealing methods on the BlackBox

Like for properties, exposing methods can be done from the `BlackBox` component by entering Prefab Mode, and clicking on the **Show available properties** button:

<figure><img src="/files/cnO93OxpHa7rDEQwPPhi" alt="" width="506"><figcaption></figcaption></figure>

This exposes the list of children and all of their components. Open a component to visualise another foldout called **Public methods**. Open this one to display all available public methods, which are preceded by a tiny **\[M]**:

<figure><img src="/files/6RlJAbVzUYVibLTxAIJL" alt="" width="563"><figcaption><p>Methods available are denoted by an M icon</p></figcaption></figure>

{% hint style="warning" %}
Note that only methods with no parameters will show up in the list. To invoke a method with parameters, consider [revealing UnityEvents](/black-box/main-features/reveal/properties/unityevents-as-buttons.md) as a button instead.
{% endhint %}

Press on the **\[+]** button to add the method to the reveal list:

<figure><img src="/files/RzXkZdtlY7v8yvqB1K7J" alt="" width="563"><figcaption><p>Two methods have been revealed</p></figcaption></figure>

Here you can customise the button's label, just like it's done for properties, and remove them again with the **\[-]** button.

Now, by exiting Prefab Mode, you will be able to see the buttons on the Prefab, and click them both in Edit and Play mode.


---

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