Page 1 of 1

Overriding Dialogue Box name

Posted: Mon Sep 28, 2020 11:43 am
by neohazardous
Hello! So Im using a GameObject "Dialogue Spawn" for all my dialogue to appear at. However, the conversation UI keeps using "Dialogue Spawn" as the speaker name in the UI. I have 2 NPCs that I want to switch between as the conversation goes. How would I go about overriding this so that the conversation uses the Actor names over the GameObject's name?

I saw that the documentation referred to an Actor override script but I am unable to find that as a component. That, and it would seem that it only allows for one name at a time.

Re: Overriding Dialogue Box name

Posted: Mon Sep 28, 2020 1:30 pm
by Tony Li
Hi,

Add a Dialogue Actor component to each NPC GameObject and select the corresponding actor in the Dialogue Actor's Actor dropdown.

If you're using a Dialogue System Trigger component to start a conversation, leave the Conversation Conversant field unassigned. It will find the GameObject with the Dialogue Actor component and use its actor name. Note that you can also enable a Display Name field in each actor in the dialogue database if you want to use that instead of the Name field.

If you're starting the conversation some other way, such as a C# script, omit the conversant and actor transforms, or pass null:

Code: Select all

DialogueManager.StartConversation("Conversation Title");
The conversation will find the GameObjects with the corresponding Dialogue Actor components.

More info: Character GameObject Assignments