Changing display name and animated portraits
Posted: Mon Jul 06, 2020 9:50 pm
This is a niche issue, but there's one instance in my game where I need to change the actor's display name temporarily. I asked about this previously and I think downloaded a little extra for it. I use a lua command called "ChangeActorName."
When I do this, the actor's portrait no longer shows up and an error is thrown saying animator is inactive.
Code: Select all
if (DialogueDebug.LogInfo) Debug.Log("Dialogue System: Changing " + actorName + "'s Display Name to " + newDisplayName);
DialogueLua.SetActorField(actorName, "Display Name", newDisplayName);
if (DialogueManager.IsConversationActive)
{
var actor = DialogueManager.MasterDatabase.GetActor(actorName);
if (actor != null)
{
var info = DialogueManager.ConversationModel.GetCharacterInfo(actor.id);
if (info != null) info.Name = newDisplayName;
}
}