Page 1 of 1

getting actorName with id

Posted: Sun Jan 10, 2021 1:26 pm
by fkkcloud
Hi,

How do I get the original actor name with speakerInfo's id?
I know that speakerInfo.Name is there but this is set to Display Name. What I need is the actor name that is bonded with the id that is not changing.

Re: getting actorName with id

Posted: Sun Jan 10, 2021 2:41 pm
by Tony Li
You can use speakerInfo.nameInDatabase. Or, to get the whole actor record:

Code: Select all

var actor = DialogueManager.masterDatabase.GetActor(speakerInfo.id);
Debug.Log(actor.Name);