Null reference exception on DLL when responses appear
Posted: Wed Mar 28, 2018 4:26 am
Hi!
I'm having a Null Reference Exception each time a response panel is shown, the error is the following:
My custom class ScarecrowDialogueUI inherits from UnityUIDialogueUI and it's ShowResponses method is the following one:
Also, the second time I call the same dialogue, for some reason Dialogue System calls ShowResponses twice instead of once as in the first execution.
What can the problem be?
Thanks in advance,
Julen
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