Hello!
I have a part of my game where just one line shows up in the middle of the screen. I want to get that random text from a similar structure as barks. I guess my question is, can I get only the string from a conversation directly in script?
Get Conversation text only
Re: Get Conversation text only
Hi,
Yes, you can create a ConversationModel. Assuming the line is assigned to an NPC:
Yes, you can create a ConversationModel. Assuming the line is assigned to an NPC:
Code: Select all
var model = new ConversationModel(DialogueManager.masterDatabase, "conversation title", null, null, true, null);
var state = model.GetState(model.firstState.firstNPCResponse);
Debug.Log("Text is " + state.subtitle.formattedText.text);