Re: multiple Textline Dialog UI in a scene
Posted: Fri Dec 06, 2019 5:26 pm
If you call the Close() method of a specific TextlineDialogueUI component, it should only close that dialogue UI.
However, if you want to stop the conversation early, and not just close its dialogue UI, you'll want to do something slightly different.
When you start a conversation, the Dialogue System adds an ActiveConversationRecord object to the DialogueManager.instance.activeConversations list. The most recently-started conversation is at the end of the list. So maybe you'd want to record it like this:
The ActiveConversationRecord has a conversationController. If you call its Close() method, it will fully stop the entire conversation and close the associated dialogueUI:
However, if you want to stop the conversation early, and not just close its dialogue UI, you'll want to do something slightly different.
When you start a conversation, the Dialogue System adds an ActiveConversationRecord object to the DialogueManager.instance.activeConversations list. The most recently-started conversation is at the end of the list. So maybe you'd want to record it like this:
Code: Select all
using System.Linq;
...
DialogueManager.StartConversation("Some Conversation");
var thisConversationRecord = DialogueManager.instance.activeConversations.Last();
Code: Select all
thisConversationRecord.conversationController.Close();