I'm having a Null Reference Exception each time a response panel is shown, the error is the following:
Code: Select all
Dialogue System: In ShowResponses(): Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.AbstractDialogueUI:ShowResponses(Subtitle, Response[], Single)
PixelCrushers.DialogueSystem.UnityUIDialogueUI:ShowResponses(Subtitle, Response[], Single) (at Assets/ThirdParty/Dialogue System/Scripts/Supplemental/UI/Dialogue UI/UnityUIDialogueUI.cs:297)
ScarecrowStudio.Modules.Dialogue.UI.Components.Overrides.ScarecrowDialogueUI:ShowResponses(Subtitle, Response[], Single) (at Assets/Scripts/Game/Modules/Dialogue/Core/UI/Components/Dialogue System Overrides/ScarecrowDialogueUI.cs:56)
PixelCrushers.DialogueSystem.ConversationView:StartResponses(Subtitle, Response[])
PixelCrushers.DialogueSystem.ConversationController:OnFinishedSubtitle(Object, EventArgs)
PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle()
PixelCrushers.DialogueSystem.ConversationView:OnFinishedSubtitle()
PixelCrushers.DialogueSystem.Sequencer:FinishSequence()
PixelCrushers.DialogueSystem.Sequencer:Update()
Code: Select all
public override void ShowResponses(Subtitle subtitle, Response[] responses, float timeout) {
GlobalProperties.Dialogue.SetEntryType(DialogueProperties.EntryType.Response);
for(int i = 0; i < responses.Length; i++) {
responses[i].formattedText.text = ParseCommas(responses[i]); //I parse a code into commas
}
ase.ShowResponses(subtitle, responses, timeout);
OverrideStyle(false, null); //styling stuff, doesn't change anything about the responses nor subtitles
}
What can the problem be?
Thanks in advance,
Julen