Current approach: Every character has 2 actors: SampleActor and SampleActor_bubble. Bubble dialogues use "_bubble" versions of the actors. Avatars have an OverrideDialogueUI component with BubbleUI assigned.
Result: Intended dialogues correctly display in a Bubble UI, however all the dialogue entries display in same bubble, over first actor's head.
Tried solutions:
1. Dividing a conversation into multiple conversations every time a speaker changes. Works, but is a nightmare to use.
2. I noticed dialogue UI is only being overriden once, on the conversation start. I tried doing it on every Dialogue Entry instead (with DialogueSystemController.SetConversationUI which I made public), but it didnt work.
3. Tried the same as 2. but insted of DialogueSystemController.SetConversationUI i tried DialogueManager.dialogueUI = myUI, but didn't work neither.
This is how it looks like:
My DialogueUI implementation:
Code: Select all
private void OnContinueDialogueButtonClicked()
{
DialogueEntry currentEntry = DialogueManager.CurrentConversationState.subtitle.dialogueEntry;
DialogueEntry nextEntry = currentEntry.GetNextEntry();
if (nextEntry != null)
{
int actorID = nextEntry.ActorID;
string actorName = DialogueManager.masterDatabase.GetActor(actorID).Name;
var overrideUIBase = DialogueManager.Instance.GetConversationUI(actorName);
var overrideUI = overrideUIBase as OverrideDialogueUI;
DialogueManager.dialogueUI = overrideUI.ui.GetComponent<IDialogueUI>();
}
OnContinue();
}
Code: Select all
public OverrideUIBase GetConversationUI(string actorName)
{
var actorGO = SequencerTools.FindSpecifier(actorName, true);
return FindHighestPriorityOverrideUI(actorGO.transform, null);
}