> For the complete documentation index, see [llms.txt](https://kb.heathen.group/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.heathen.group/old-kb/toolkit-for-ui-and-ux/unity/objects/command-data.md).

# Command Data

## Introduction

{% hint style="info" %}
Part of the [Command System](/old-kb/toolkit-for-ui-and-ux/unity/learning/core-concepts/command-system.md) of the UX Foundation and UX Compelete assets
{% endhint %}

Represents a command and its related data. This can be used to convert any string into a refernce to the related commannds GameEvent and to extract the arguments from the command if any.

### Fields and Attributes

### isValid

Indicates the command is valid, if false other fields will be null and this command can be ignored.

### command

A reference to the related [GameEvent](/old-kb/assets/system-core/game-events.md) if valid.

### sourceText

The text that was parsed to find this command, this may contain additional commands.

### arguments

The part of the text that follows the command if any

## Constructor

```csharp
public CommandData(CommandLibrary library, string command, bool userOnly)
```

This constructor takes a refernce to a [Command Library](/old-kb/toolkit-for-ui-and-ux/unity/objects/command-library.md) and will parse the provided text to construct the resulting command.


---

# 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://kb.heathen.group/old-kb/toolkit-for-ui-and-ux/unity/objects/command-data.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.
