Page 1 of 1

Current Panel of the Current Dialog

Posted: Mon Mar 27, 2023 8:48 am
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

Re: Current Panel of the Current Dialog

Posted: Mon Mar 27, 2023 9:23 am
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.