# Adding and Removing Optional Components

## Adding an Optional Component

Adding a component can be done by typing in the desired name of the component you'd like to add to your AI (within the Project tab). You can refer to the wiki for all optional components that can be used. In this example, the Emerald Debugger component is being added.

{% hint style="warning" %}
**Important:** This should **not** be the editor script. Ensure that you never have more than 1 of each component attached to an AI.
{% endhint %}

<figure><img src="/files/TfXNCY0mGHA3wGnznXqF" alt=""><figcaption></figcaption></figure>

Select the AI you'd like to add the component to and drag the desired component to your AI. You can choose where you want the component positioned on your AI while doing this.

<figure><img src="/files/CkijhPVqAhEzaoQuCLBU" alt=""><figcaption></figcaption></figure>

## Removing an Optional Component

To remove an optional component from an AI, simply right click the component you'd like to remove and selecting Remove Component.

{% hint style="info" %}
**Note:** This will only work for optional components. Removing a component will cause it to lose the settings you applied. However, you can undo through Unity to undo this action.
{% endhint %}

<figure><img src="/files/kDAZrEMfQTh6zDVsDp3g" alt=""><figcaption></figcaption></figure>

## Moving or Rearranging Components

You can move a component at any time by selecting the component (with the left mouse button) and moving it up or down to the desired position within the Inspector of the selected AI.

<figure><img src="/files/jLPsgpDTeJvzA6YdlLSk" alt=""><figcaption></figcaption></figure>


---

# 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://black-horizon-studios.gitbook.io/emerald-ai-wiki/emerald-components-optional/adding-and-removing-optional-components.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.
