Skip to content

Adding a dialogue for an NPC


In this tutorial, you will learn how to:

  • Add dialogues to the dialogue pool
  • Attach the dialogue to a non-character player (NPC)
  • Trigger the conversation in the game

Preparing dialogues

  1. In the Explorer window, add dialogues to the dialogue pool by choosing Gameplay > + New Dialogue.


  2. Populate the dialogue.

    Field Description
    Name The name of the dialogue. The name is the first text that a player sees when the conversation is activated.
    Sentence Sentences that speakers say during the conversation. You can add as many sentences as you like.
    NPC/Player This is the speaker type you can specify. You can create a consecutive conversation with it.
    Text The content of the sentence


  3. Add another dialogue by choosing the + icon.


Creating an NPC and attaching a dialogue to it

  1. Find a model in Asset Library and place it in the scene.


  2. Make the model an NPC by attaching a Character component to it.


  3. Add a Dialogue component to the NPC and select a dialogue from the dialogue pool. You can make the dialogue repetitive or one-off.



Adding a trigger for the convesation

  1. On the pane of the Dialogue component, set the trigger for the conversation. The default condition of the trigger is self-trigger on start.
  2. Set the trigger condition to Touched by player. You can also try another condition and see how it works in your Space.


  3. Now you can playtest it by switching to Play Mode.