Adding Narrative Design to your Character

This guide provides the ultimate instructions for incorporating Narrative Design into your Convai-powered characters. Follow this step-by-step tutorial, open your project, and let's begin!

Convai Playground

Step 1: Select the Character in which you want to enable Narrative Design

For this demo, we are using Seraphine Whisperwind. You can select whatever character you want to enable Narrative Design.

Step 2: Open Narrative Design in Convai Playground

Select the Narrative Design option from the side panel and create your narrative design

For more information how to create narrative design in the Convai Playground please refer to the following YouTube video series:

For this sample, we have created the following Narrative design

You are all set to bring your character from Convai Playground to Unity, let's hope over to Unity to continue the guide

Unity Setup

Step 1: Add the Narrative Design Manager Component

1: Select your Convai Character in the scene and look for ConvaiNPC component in the inspector panel. Click on Add Components button

2: Select Narrative Design Manager checkbox and then click on Apply Changes button

Using Unity Inspector

1: Select your Convai Character and find Add Component button in the inspector panel

2: Search for Narrative Design Manager in the search box and select it

Step 2: Setup the Narrative Design Component

After adding the Narrative Design Component, you will be able to add the following component

This component system assumes that API key is setup correctly, so ensure that API key is setup correctly otherwise an error will be thrown.

After adding, component will retrieve the sections for the character ID taken from the ConvaiNPC, please wait for some time depending upon your network speed

The following section events are for character used in demo, and you will see section events corresponding to your character in which Narrative Design is enabled.

Getting to know the Narrative Design Component

Expanding the section event, you will see two unity events you can subscribe to, one is triggered when section starts, and another one is triggered when section ends

Getting to know about Section Triggers

Section triggers are a way to directly invoke a section in narrative design and can be used to jump to a different section in your narrative design

Step 1: Select the game object you want to make a trigger, in this example we have selected a simple cube, but it's up to your imagination.

Make sure that game object you have decided to be a trigger have a collider attach to it

Step 2: Add Narrative design Trigger from Add Component menu by searching for it

Step 3: Make the collider a trigger.

Step 4: Assign your Convai NPC to Convai NPC field

Now you can select from the "Trigger" dropdown which trigger should be invoked when player enters this trigger box.

We have also added a way for you to manually invoke this trigger. You can use InvokeSelectedTrigger function to invoke the trigger from anywhere.

Last updated