> 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/convai-unity-sdk/features/vision/quick-start.md).

# Vision quick start

Add Vision to an existing Convai scene in three steps. The SDK adds and wires the required components automatically when you set `ConvaiRoomManager` to Video mode.

### Prerequisites

Before starting, verify:

* [ ] A `ConvaiCharacter` is in the scene and responds to speech in Play Mode

{% stepper %}
{% step %}

#### Set Connection Type to Video

Select the `ConvaiRoomManager` GameObject in the Hierarchy. In the Inspector, set **Connection Type** to **Video**.

<figure><img src="/files/dP8UgJ0WHzptA4pPEgMv" alt="Connection Type set to Video on ConvaiRoomManager in the Inspector"><figcaption><p>Connection Type set to Video on ConvaiRoomManager.</p></figcaption></figure>

A dialog appears immediately:

> **Convai Vision Setup** — Connection Type is set to Video, but required vision components are missing. Add `ConvaiVisionPublisher` and `CameraVisionFrameSource` under this ConvaiRoomManager?

Click **Add Components**.

<figure><img src="/files/x5mvMh7fguoFP3Q5AkQQ" alt="Convai Vision Setup dialog prompt"><figcaption><p>Convai Vision Setup dialog prompt.</p></figcaption></figure>

The SDK creates a child GameObject named **ConvaiVisionRoot** under `ConvaiRoomManager` and adds both `ConvaiVisionPublisher` and `CameraVisionFrameSource` to it.
{% endstep %}

{% step %}

#### Assign a camera

Select the **ConvaiVisionRoot** GameObject (child of `ConvaiRoomManager`). On the `CameraVisionFrameSource` component, locate the **Target Camera** field.

* If your scene has a `Camera` tagged **MainCamera**, leave the field blank — the component resolves it automatically at runtime.
* To capture a specific camera (an overhead view, a security camera), drag that camera into the **Target Camera** field.

The default **Capture Preset** is **Balanced** (1280 × 720 at 15 fps), which suits most scenarios.

If **Target Camera** is blank and no camera in the scene is tagged **MainCamera**, the frame source enters `Failed` state at runtime. Always assign a camera explicitly or ensure one camera has the **MainCamera** tag.

<figure><img src="/files/mcjQZtb1RxqoYx4TPgnA" alt="Target Camera assigned on CameraVisionFrameSource in the Inspector"><figcaption><p>Target Camera assigned on CameraVisionFrameSource.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Verify with Debug Preview

On any scene GameObject, click **Add Component** → **Convai/Vision/Vision Debug Preview (Editor Only)**.

Press **Play**. An overlay appears in the Game view showing the live camera feed and a statistics panel. Once the room connects, the FPS counter increments and the frame count increases.

<figure><img src="/files/qqIgew9El2hQD7wf3ZkL" alt="Vision Debug Preview component added to a scene GameObject"><figcaption><p>Vision Debug Preview component added.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Success:** The Debug Preview overlay shows a live image and a non-zero FPS counter. Reading `ConvaiVisionPublisher.IsPublishing` from any script returns `true`. The character now receives the scene camera feed alongside the audio conversation.
{% endhint %}

{% hint style="warning" %}
If the overlay stays blank or the FPS counter reads zero, verify that `ConvaiRoomManager.Connection Type` is set to **Video** and that the room has fully connected. See [Troubleshoot vision](/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/troubleshooting-and-diagnostics.md) for a step-by-step diagnosis.
{% endhint %}

### Manual component setup

If you clicked **Later** on the dialog, or want to place the components on a specific GameObject, add them manually:

1. Select the target GameObject (any persistent scene object — typically on or near your NPC).
2. **Add Component** → search for **Convai Vision Publisher**.
3. On the same GameObject (or a child), **Add Component** → **Convai/Vision/Camera Vision Frame Source**.
4. Assign the **Target Camera** if not using `Camera.main`.
5. Leave the **Source** field on `ConvaiVisionPublisher` blank — the publisher auto-discovers `CameraVisionFrameSource` on the same GameObject at runtime. Assign it explicitly only if you have multiple frame sources in the scene.

<figure><img src="/files/kGc43z3e46dDMKLEQ8Cy" alt="Manual vision setup showing ConvaiVisionPublisher and CameraVisionFrameSource components"><figcaption><p>Manual vision setup — publisher and frame source components.</p></figcaption></figure>

### Next steps

{% content-ref url="/pages/l8e8VHFqAfizSNNTRxLW" %}
[How vision works](/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/how-vision-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/ae0edd0be3d5b82330547283ee17259071673848" %}
[Vision frame sources](/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/frame-sources.md)
{% endcontent-ref %}

{% content-ref url="/pages/8e81321c92ed2b28e658ae5686d3cac89efa9213" %}
[Publish policies](/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/publishing-and-policies.md)
{% endcontent-ref %}

{% content-ref url="/pages/nydFtT4kGp2HzURUi5L5" %}
[Troubleshoot vision](/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/troubleshooting-and-diagnostics.md)
{% endcontent-ref %}


---

# 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:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/convai-unity-sdk/features/vision/quick-start.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.
