I notice that if I use [panel] tag, the color setting is not working. I looked at the code:
Code: Select all
// StandardUISubtitleControls.cs
// line 439
public override void ShowSubtitle(Subtitle subtitle)
{
if (subtitle == null) return;
DialogueActor dialogueActor;
var panel = GetPanel(subtitle, out dialogueActor); // Here dialogueActor is set
// (omit not relevant code)
// Here actor used to adjust color
if (dialogueActor != null && dialogueActor.standardDialogueUISettings.setSubtitleColor)
{
subtitle.formattedText.text = dialogueActor.AdjustSubtitleColor(subtitle);
}
SupercedeOtherPanels(panel);
panel.ShowSubtitle(subtitle);
}
}
Code: Select all
// StandardUISubtitleControls.cs
// line 202
public virtual StandardUISubtitlePanel GetPanel(Subtitle subtitle, out DialogueActor dialogueActor)
{
dialogueActor = null;
if (subtitle == null) return m_defaultNPCPanel;
// Check if we have a forced override:
if (m_forcedOverridePanel != null) return m_forcedOverridePanel;
// Check [panel=#] tag:
var overrideIndex = subtitle.formattedText.subtitlePanelNumber;
if (0 <= overrideIndex && overrideIndex < m_builtinPanels.Count)
{
var overridePanel = m_builtinPanels[overrideIndex];
overridePanel.actorOverridingPanel = subtitle.speakerInfo.transform;
return overridePanel;
}
// Check actor ID override:
if (m_actorIdOverridePanel.ContainsKey(subtitle.speakerInfo.id))
{
var overridePanel = m_actorIdOverridePanel[subtitle.speakerInfo.id];
overridePanel.actorOverridingPanel = subtitle.speakerInfo.transform;
return overridePanel;
}
// Get actor's panel:
var speakerTransform = subtitle.speakerInfo.transform;
var panel = GetActorTransformPanel(speakerTransform, subtitle.speakerInfo.isNPC ? m_defaultNPCPanel : m_defaultPCPanel, out dialogueActor);
return panel;
}
Is it a bug? Can you advice some workaround for this?