# Command Parser Example

{% hint style="success" %}

#### Like what your seeing?

Support us as a [GitHub Sponsor](/old-kb/where-to-buy/become-a-sponsor.md) and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.\
\
These articles are made possible by our [GitHub Sponsors](/old-kb/where-to-buy/become-a-sponsor.md) ... become a sponsor today!
{% endhint %}

## Introduction

![](/files/ZbY0cGMrWUi5pxlgmcbH)

This scene demonstrates the use of the Command System. Command system lets you parse string input such as from an in-game chat and trigger paramiterized [game events](/old-kb/assets/system-core/game-events.md). This system can be used to create console or MMO chat like command systems for player chats, emotes, help systems and more.

### What do I learn?

1. How to use the Command Director
2. Setting up a Command Library and Commands
3. How to use both simple and paramiterized commands
4. How to access the Knowledge Base (where you are now)
5. How to access the support [Discord ](https://discord.gg/6X3xrRc)
6. How to leave a review 😉

## Objects

### Example Scripts

The example scripts GameObject implaments the [Command Director](/old-kb/toolkit-for-ui-and-ux/unity/components/command-director.md) component which provides easy access to parsing input and exposes a simple Unity Event which will be raised any time a command is found from input.

This GameObject also implaments a simple custom sample script which simply reads input text from the text box and passes it to the Command Director for parsing. The Command Parser Example Script also handles the Command Found event and simply invokes the event as a crude in-game example.


---

# 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://kb.heathen.group/old-kb/toolkit-for-ui-and-ux/unity/learning/sample-scenes/command-parser-example.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.
