Importing Custom Characters

Follow these instructions to set up your imported character with Custom Model with Convai.

To import your custom characters into your Convai-powered Unity project, you will first need to bring your model into your project. The model needs at least two animations: one for talking and one for Idle.

Prerequisites

When you want to set up your custom character with Convai, you will need your character model and two animations: Idle and Talking.

Create an animator controller with the two animations that looks like this. You should also add a 'Talk' Boolean to ensure that you can trigger the animation. Here is a YouTube tutorial on how to set up an animator controller. This is the bare minimum animator setup that you need to do.

Step 1: Add Animator to your custom character

Select your character from the Hierarchy and Add Animator Component

Convai Plugin ships with two pre-made animation controller, you can choose these controllers or can assign your custom controller, whatever fits your need. For this demo we are going with Feminine NPC Animator

Step 2: Adding a Trigger Volume

With your custom character selected, add a Collision shape of your choice, for this demo we are going with a Capsule Collider

We will make this Collider a trigger, for this we will enable the Is Trigger option in the inspector panel

We will adjust the Center, Radius and Height of the collider such that it fits our character

Step 3: Add ConvaiNPC Component

With your Custom Character Selection add ConvaiNPC component. By doing so, your Game objectgame should look like this:

We assume that nothing other than pre-instructed components were added by you; your Game Object component list may be different

Copy your character's ID and name from Convai Playground and paste them here.

Step 4: Setup a: game object for Convai Character

We will assign Convai Character layer to your Custom Character Game Object

Now your Custom Character is all set to work with Convai Plugin

Last updated