Switching system

What do you need help with?

Question

Installation method

Unity Asset Store

Issue area

Other

Impact

Minor - small issue or improvement

Unity version

6000.4.2f1

Convai Unity SDK version

7.3.1

Target platform

WebGL

Where does it happen?

Not tested yet

Short summary

I would like to know how this switching system should be implemented with the Convai Unity SDK.

What happened?

I have an AI character placed in specific locations in my game.

I want the character to say certain predefined sentences exactly as I write them, without changing, paraphrasing, or generating alternative versions of those sentences.

At the same time, I want the player to be able to ask the character questions freely, and have the character answer naturally using Convai.

Is this setup supported by Convai?

If yes, what is the recommended way to implement it in Unity so that I can switch between:

  1. Fixed/predefined dialogue that must remain exactly unchanged.
  2. Free AI conversation where the player can ask questions and Convai generates the response.

I would like to know how this switching system should be implemented with the Convai Unity SDK.

I checked the relevant documentation, resources, and similar forum posts before posting.

on

I confirm that I did not include API keys, tokens, passwords, secrets, private character data, private conversation logs, or customer data.

on

Yes, this setup is supported.

For your use case, we recommend combining Convai’s normal conversational flow with Narrative Design.

When the character needs to say a predefined line exactly as written, you can place the line inside a Narrative Design node using the <speak> syntax:

<speak>Welcome to the laboratory. Please stay behind the yellow line.</speak>

Content inside <speak> is spoken exactly as provided, without paraphrasing or adding additional dialogue.

In Unity, you can then trigger that Narrative Design section from your gameplay logic. For example, when the player enters a specific trigger volume or reaches a particular location, your game can fire the corresponding Narrative Design trigger.

The flow can therefore look like this:

Player enters location → Unity fires Narrative trigger → character speaks the exact <speak> line → normal Convai conversation continues.

Outside of those scripted moments, the character can remain in the regular Convai conversation flow, allowing the player to ask arbitrary questions and receive naturally generated responses.

We would not recommend relying on Dynamic Context alone for dialogue that must be reproduced word-for-word. Dynamic Context is better suited for informing the character about runtime game state, such as the player’s current location, quest state, or world events. The character can then reason and respond naturally based on that information, but the response itself remains generative.

So, in general:

  • Exact/scripted dialogue: Narrative Design + <speak>

  • Location/gameplay events: Unity → Narrative Design triggers

  • Runtime world information: Dynamic Context

  • Free player conversation: standard Convai conversational flow

This lets the same Convai character move between tightly controlled narrative moments and open-ended AI conversation without requiring separate characters.