/// <summary> /// Logs warnings if any critical controls are unassigned. /// </summary> private void FindControls() { if (addEventSystemIfNeeded) { UITools.RequireEventSystem(); } qteControls = new UnityUIQTEControls(qteIndicators); if (DialogueDebug.LogErrors) { if (DialogueDebug.LogWarnings) { if (dialogue.npcSubtitle.line == null) { Debug.LogWarning(string.Format("{0}: TextMeshProDialogueUI NPC Subtitle Line needs to be assigned.", DialogueDebug.Prefix)); } if (dialogue.pcSubtitle.line == null) { Debug.LogWarning(string.Format("{0}: TextMeshProDialogueUI PC Subtitle Line needs to be assigned.", DialogueDebug.Prefix)); } if (dialogue.responseMenu.buttons.Length == 0 && dialogue.responseMenu.buttonTemplate == null) { Debug.LogWarning(string.Format("{0}: TextMeshProDialogueUI Response buttons need to be assigned.", DialogueDebug.Prefix)); } if (alert.line == null) { Debug.LogWarning(string.Format("{0}: TextMeshProDialogueUI Alert Line needs to be assigned.", DialogueDebug.Prefix)); } } } originalNPCSubtitle = dialogue.npcSubtitle; originalPCSubtitle = dialogue.pcSubtitle; originalResponseMenu = dialogue.responseMenu; }
public override void ShowSubtitle(Subtitle subtitle) { if (findActorOverrides) { var overrideControls = FindActorOverride(subtitle.speakerInfo.transform); if (subtitle.speakerInfo.characterType == CharacterType.NPC) { dialogue.npcSubtitle = (overrideControls != null) ? overrideControls.subtitle : originalNPCSubtitle; } else { dialogue.pcSubtitle = (overrideControls != null) ? overrideControls.subtitle : originalPCSubtitle; } } currentSubtitleControls = (subtitle.speakerInfo.characterType == CharacterType.NPC) ? dialogue.npcSubtitle : dialogue.pcSubtitle; HideResponses(); base.ShowSubtitle(subtitle); CheckSubtitleAutoFocus(subtitle); }
public override void HideSubtitle(Subtitle subtitle) { base.HideSubtitle(subtitle); currentSubtitleControls = null; }