Current Panel of the Current Dialog

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dralks
Posts: 44
Joined: Mon May 24, 2021 6:19 pm

Current Panel of the Current Dialog

Post by Dralks »

is there a default way to get the current panel of the current dialog? I can only see "SetPanel" available, I need a condition around is conversation active on a specific panel
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Current Panel of the Current Dialog

Post by Tony Li »

Hi,

Yes, here's an example:

Code: Select all

void OnConversationLine(Subtitle subtitle)
{
    DialogueActor dialogueActor;
    var panel = DialogueManager.standardDialogueUI.conversationUIElements.standardSubtitleControls.GetPanel(subtitle, out dialogueActor);
    Debug.Log($"Will show subtitle '{subtitle.formattedText.text}' in panel {panel}", panel);
}
If it's outside of OnConversationLine, you can use DialogueManager.currentConversationState.subtitle.
Post Reply