Page 1 of 1
Dialogue override using the sequence
Posted: Fri Sep 27, 2024 6:52 am
by mudukke
Out of interest can do a dialogue override on the sequence. I have opening sequence that starts with main dialogue UI but I would like to use the dialogue override ui. How would switch between the dialogue override and the main dialogue using the sequence if that's possible?
Re: Dialogue override using the sequence
Posted: Fri Sep 27, 2024 8:03 am
by Tony Li
Hi,
In C#, you can use:
Code: Select all
DialogueManager.conversationView.dialogueUI = some_Other_Dialogue_UI;
You could write a sequencer command that runs that code. Maybe something like:
Code: Select all
public class SequencerCommandSetDialogueUI : SequencerCommand
{
void Awake()
{
var uiGO = GetSubject(0);
if (uiGO == null)
{
Debug.LogWarning($"SetDialogueUI() can't find GameObject named {GetParameter(0)}");
}
else
{
var ui = uiGO.GetComponent<IDialogueUI>();
if (ui == null)
{
Debug.LogWarning($"SetDialogueUI() can't find a UI on {uiGO}");
}
else
{
DialogueManager.conversationView.dialogueUI = ui;
}
}
Stop();
}
}