Null Reference Exception for conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
obsidianmystic
Posts: 5
Joined: Sun May 12, 2019 1:40 pm

Null Reference Exception for conversation

Post by obsidianmystic »

Hello,

Was wondering if I could get some help on this.

I have a strange error where when I attempt to run a Start Conversation action via the OnUse() function of a Dialogue System Trigger component, I get a null reference exception pointing to the line:

var conversationAsset = DialogueManager.MasterDatabase.GetConversation(conversation);

in DialogueSystemTrigger.cs.

I for sure have the correct conversation picked in the conversation drop down and I had a test conversation working fine before I tried to assign this new conversation. So I'm not sure where the problem is coming from.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Null Reference Exception for conversation

Post by Tony Li »

Hi,

Does your scene have a Dialogue Manager GameObject?
obsidianmystic
Posts: 5
Joined: Sun May 12, 2019 1:40 pm

Re: Null Reference Exception for conversation

Post by obsidianmystic »

Sometimes it really is just that easy... I had it disabled.

Thanks Tony.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Null Reference Exception for conversation

Post by Tony Li »

Glad that was it! Thanks for making my morning by letting me guess one right on the first try. :)
Post Reply