Get actorName from an actor component but not the display name

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Syoka
Posts: 11
Joined: Sun Apr 21, 2024 1:38 pm

Get actorName from an actor component but not the display name

Post by Syoka »

Hi, I want to make a script with method that: Input the DialogueActor component, then the method will StartConversation(actorName+"Conversation"), but the actor name is expected to be the database name but not the display name.
I have tried GetActorName() but it is the display name...
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get actorName from an actor component but not the display name

Post by Tony Li »

Hi,

Use the "actor" property:

Code: Select all

void StartConversationWithDialogueActor(DialogueActor dialogueActor)
{
    DialogueManager.StartConversation(dialogueActor.actor + " Conversation");
}
Syoka
Posts: 11
Joined: Sun Apr 21, 2024 1:38 pm

Re: Get actorName from an actor component but not the display name

Post by Syoka »

Oh Thank you!
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get actorName from an actor component but not the display name

Post by Tony Li »

Glad to help!
Post Reply