/// <summary> /// Makes sure we have a GUIRoot and logs warnings if any critical controls are unassigned. /// </summary> private void FindControls() { if (guiRoot == null) { guiRoot = GetComponentInChildren <GUIRoot>(); } unityUIRoot = new UnityUIRoot(guiRoot); unityQTEControls = new UnityQTEControls(qteIndicators); SetupContinueButton(dialogue.npcSubtitle.continueButton); SetupContinueButton(dialogue.pcSubtitle.continueButton); SetupContinueButton(alert.continueButton); if (DialogueDebug.LogErrors) { if (guiRoot == null) { Debug.LogError(string.Format("{0}: UnityDialogueUI can't find GUIRoot and won't be able to display dialogue.", new System.Object[] { DialogueDebug.Prefix })); } if (DialogueDebug.LogWarnings) { if (dialogue.npcSubtitle.line == null) { Debug.LogWarning(string.Format("{0}: UnityDialogueUI NPC Subtitle Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); } if (dialogue.pcSubtitle.line == null) { Debug.LogWarning(string.Format("{0}: UnityDialogueUI PC Subtitle Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); } if (dialogue.responseMenu.buttons.Length == 0) { Debug.LogWarning(string.Format("{0}: UnityDialogueUI Response buttons need to be assigned.", new System.Object[] { DialogueDebug.Prefix })); } if (alert.line == null) { Debug.LogWarning(string.Format("{0}: UnityDialogueUI Alert Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); } } } }
/// <summary> /// Makes sure we have a GUIRoot and logs warnings if any critical controls are unassigned. /// </summary> private void FindControls() { if (guiRoot == null) guiRoot = GetComponentInChildren<GUIRoot>(); unityUIRoot = new UnityUIRoot(guiRoot); unityQTEControls = new UnityQTEControls(qteIndicators); SetupContinueButton(dialogue.npcSubtitle.continueButton); SetupContinueButton(dialogue.pcSubtitle.continueButton); SetupContinueButton(alert.continueButton); if (DialogueDebug.LogErrors) { if (guiRoot == null) Debug.LogError(string.Format("{0}: UnityDialogueUI can't find GUIRoot and won't be able to display dialogue.", new System.Object[] { DialogueDebug.Prefix })); if (DialogueDebug.LogWarnings) { if (dialogue.npcSubtitle.line == null) Debug.LogWarning(string.Format("{0}: UnityDialogueUI NPC Subtitle Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); if (dialogue.pcSubtitle.line == null) Debug.LogWarning(string.Format("{0}: UnityDialogueUI PC Subtitle Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); if (dialogue.responseMenu.buttons.Length == 0) Debug.LogWarning(string.Format("{0}: UnityDialogueUI Response buttons need to be assigned.", new System.Object[] { DialogueDebug.Prefix })); if (alert.line == null) Debug.LogWarning(string.Format("{0}: UnityDialogueUI Alert Line needs to be assigned.", new System.Object[] { DialogueDebug.Prefix })); } } }