Page 1 of 1

Set different Dialogue UI from script

Posted: Mon Apr 19, 2021 8:13 pm
by olakehs
Hi everyone

Might be a very basic question, but I've had a search around and read through the manual and can't seem to find it so thought I'd ask here. How do I set different Dialogue UI via script?

What I've currently got is an array currently attached to the DialogueManager which I place a bunch of different Dialogue UI I'd like to use (e.g. some are left-hand side, right-hand side, with/without background panel etc). The code I'm currently using which doesn't seem to work:

Code: Select all

DialogueManager.instance.SetDialoguePanel(DialogueManager.instance.GetComponent<MyDialogueList>().DialogueUIList[1]);
Thanks in advance for any advice

Re: Set different Dialogue UI from script

Posted: Mon Apr 19, 2021 9:24 pm
by Tony Li
Hi,

SetDialoguePanel() sets the current dialogue UI visible or invisible.

Use DialogueManager.UseDialogueUI() to set a different dialogue UI from script.

Re: Set different Dialogue UI from script

Posted: Mon Apr 19, 2021 9:51 pm
by olakehs
Thanks again Tony!

Also, if you don't mind, how would one change dialogue panels mid-convo? Is there something I need to place in the Script field at a node's Dialogue Entry?

Re: Set different Dialogue UI from script

Posted: Mon Apr 19, 2021 10:01 pm
by Tony Li
To use a different subtitle panel for a single node, use a [panel=#] markup tag in the node's Dialogue Text.

To switch permanently to a different panel, use the SetPanel() sequencer command in the node's Sequence field.

Re: Set different Dialogue UI from script

Posted: Tue Apr 20, 2021 12:08 am
by olakehs
Thank you!!