Showing Conversant Name without Gameobject
Posted: Fri Jul 27, 2018 7:40 pm
Hi,
In my text adventure game, the player sends messages to many different NPCs and none of them have GameObjects. I'm trying to get the top Header text to display the conversant's name, but only NPC works if I try setting the conversant in the dialogue editor for the conversation. The code I'm using is
Basically the currentConversant is always null unless it is NPC and I suspect it is because I do not have GameObjects to go along with my actors.
Is there a way I can just get the string for the currentConversant name?
Thanks.
In my text adventure game, the player sends messages to many different NPCs and none of them have GameObjects. I'm trying to get the top Header text to display the conversant's name, but only NPC works if I try setting the conversant in the dialogue editor for the conversation. The code I'm using is
Code: Select all
void OnEnable()
{
if (DialogueManager.currentConversant != null)
title.text = DialogueManager.currentConversant.name;
else
title.text = "Anonymous";
}
Is there a way I can just get the string for the currentConversant name?
Thanks.