speakerInfo.nameInDatabase returning display name?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Strook
Posts: 70
Joined: Fri Nov 08, 2019 10:51 am

speakerInfo.nameInDatabase returning display name?

Post by Strook »

Hello! I'm using a custom script to modifiy the color of some UI during dialogue (The background of the title of the name of the character)

I'm using:

Code: Select all

subtitle.speakerInfo.nameInDatabase


to get some custom data from the actor, but logging this value, it seems that this always returning the "Display Name" of the character, and not the "Name" value from the database! Is this expected, and if not, is there a way to fix this?

This seems to happens when "Use Display Name" is checked, but Im not sure!


Thanks!
Currently working on ->Squeakross: Home Squeak Home<- Using Dialogue System Save System and other features.
Previous game made with Dialogue system ->The Spirit and The mouse<-
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: speakerInfo.nameInDatabase returning display name?

Post by Tony Li »

Hi,

That was a bug that was fixed in version 2.2.28.

Since you're locked on an older version for now, you can use subtitle.speakerInfo.id to get the Actor ID instead. Example:

Code: Select all

Actor actor = DialogueManager.masterDatabase.GetActor(subtitle.speakerInfo.id);
string nameInDatabase = actor.Name;
User avatar
Strook
Posts: 70
Joined: Fri Nov 08, 2019 10:51 am

Re: speakerInfo.nameInDatabase returning display name?

Post by Strook »

Ha! that's amazing, thanks a lot!!
Currently working on ->Squeakross: Home Squeak Home<- Using Dialogue System Save System and other features.
Previous game made with Dialogue system ->The Spirit and The mouse<-
User avatar
Tony Li
Posts: 21975
Joined: Thu Jul 18, 2013 1:27 pm

Re: speakerInfo.nameInDatabase returning display name?

Post by Tony Li »

Happy to help!
Post Reply