> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/plugins-and-integrations/unity-plugin-beta-overview/getting-started/setup/custom-scene-setup.md).

# Custom Scene Setup

## Introduction

This guide shows how to integrate Convai into your own Unity scene by adding the **Convai Manager**, creating a Convai Player, and configuring Convai Characters.

## Prerequisites

* Convai SDK installed
* API key configured successfully
* Your scene opened in Unity

## Step-by-step

{% stepper %}
{% step %}
**Add the Convai Manager**

* In Unity top menu, go to **GameObject → Convai → Setup Required Components**\
  **or** Right-click in the **Hierarchy** → **Convai → Setup Required Components**

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

* Confirm and proceed in the popup.
* **Expected result:** A single **Convai Manager** object exists in your scene.

<figure><img src="/files/xAfJjXSiwfIBi7aekytS" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Create or select your Player object**

* Select your existing player GameObject, or create an empty one.
* Add **Convai Player Component**.
* Set **Player Name**.
* **Expected result:** The scene has exactly one configured Convai Player.

<figure><img src="/files/wVJAVdezMVhmcQzylEW1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Add Convai Character components**

For each character GameObject you want to make conversational:

* Add **Convai Character** component
* Set **Character ID**

<figure><img src="/files/i55DEztZDz7eoQpokjUw" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Get your Character ID from Convai**

* [In Convai dashboard](https://docs.convai.com/api-docs/convai-playground/character-customization/character-description#id-1.-character-name-and-id), open your character and copy its ID.
  {% endstep %}

{% step %}
**Validate your scene setup**

* Use one of the validation options:
  * Top menu: **GameObject → Convai → Validate Scene Setup**
  * Hierarchy right-click: **Convai → Validate Scene Setup**

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

* **Expected result:** A success message like:
  * “Scene setup is correct!” and the number of Convai Characters found.

<figure><img src="/files/KswRq4cpQmfFK369ko1Z" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Run a conversation test**

* Press **Play**
* Speak using microphone or use Chat UI if present
* **Expected result:** Characters respond. Microphone conversation is **hands-free** (no push-to-talk required).
  {% endstep %}
  {% endstepper %}

## Troubleshooting

* **Validation fails**
  * Confirm that a **Convai Manager** object exists in the scene.
  * Ensure you added **Convai Player Component** to a player object.
  * Ensure each character has a valid **Character ID**.
* **Characters don’t respond**
  * Confirm API key is set.
  * Check Console for network/auth errors.

## Conclusion

You’ve integrated Convai into your custom scene, validated the setup, and confirmed characters can respond. Next, optionally add **Chat UI** to support text input and transcripts.

{% hint style="info" %}
**Need help?** For questions, please visit the [**Convai Developer Forum**](https://forum.convai.com/).
{% endhint %}


---

# 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.convai.com/api-docs/plugins-and-integrations/unity-plugin-beta-overview/getting-started/setup/custom-scene-setup.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.
