> For the complete documentation index, see [llms.txt](https://docs.pentafloat.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentafloat.com/documentation/commands/additional-attributes.md).

# Additional attributes

## Additional attributes

{% tabs %}
{% tab title="Description" %}

```csharp
[Command]
[Description("Gives 5000 coins to the player")]
public static void Motherlode()
{
    coins += 5000;
}
```

Commands can have a description added to them with the `[Description]` attribute.\
To see the description of a command, type `help <command name>` in the command field.
{% endtab %}

{% tab title="Prefix" %}

```csharp
[Prefix("score")]
public static class ScoreManager
{
    [Command]
    public static int Current { get; set; }

    [Command]
    public static void Reset()
    {
        Current = 0;
    }
}
```

Commands can be organized together by using the `[Prefix]` attribute on a class, which then groups all the commands in that class under the same prefix.\
It can be used on classes, methods or properties.

The above example would result in the commands looking like this in the command field:\ <img src="/files/NvnN4EmjO45zcKiqGWtH" alt="" data-size="original">

{% hint style="info" %}
The prefix character can be changed in project settings. See the [settings section](/documentation/settings.md) for more details.
{% endhint %}
{% endtab %}

{% tab title="Editor Only" %}

```csharp
[Command]
[EditorOnly]
public static void RefreshAssets()
{
    AssetDatabase.SaveAssets();
    AssetDatabase.Refresh();
}
```

Commands can be constrained to only show up in edit-mode, and not be shown in play-mode, with the `[EditorOnly]` attribute.\
It can be used on classes, methods or properties.
{% endtab %}

{% tab title="Runtime Only" %}

```csharp
[Command]
[RuntimeOnly]
public static void HealPlayers(int amount)
{
    Player[] players = FindObjectsByType<Player>(FindObjectsSortMode.None);

    foreach (var player in players)
    {
        player.Health += amount;
    }
}
```

Commands can be constrained to only show up in play-mode, and not be shown in edit-mode, with the `[RuntimeOnly]` attribute.\
It can be used on classes, methods or properties.
{% endtab %}
{% endtabs %}


---

# 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://docs.pentafloat.com/documentation/commands/additional-attributes.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.
