OnConversationStart and OnConversationEnd events working in some scenes and not others

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ytrevor
Posts: 5
Joined: Wed Jun 15, 2022 11:22 pm

OnConversationStart and OnConversationEnd events working in some scenes and not others

Post by ytrevor »

I have multiple NPCs in a scene with the correct components attached to them (Dialogue System Trigger, Dialogue System Events, and Usable), and they are using different conversations from each other. In other scenes, also with multiple NPCs, the Dialogue System Events are firing as intended with no problem, but not with these NPCs. I'm sure its not the Dialogue Manager object since its copy and pasted from a scene in which there is no problem with these events.

I also made sure that the components from these NPCs matched with NPCs that had the events working in previous scenes, and still the events aren't working. Could the problem be in the conversation database? Or I'm not sure what to look for to further debug these NPCs.

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

Re: OnConversationStart and OnConversationEnd events working in some scenes and not others

Post by Tony Li »

Hi,

Do your NPCs have direct references to the scene's Dialogue Manager? If so, please be aware that the Dialogue Manager GameObject survives scene changes by default, so the reference won't be valid after changing scenes. Please see this article for an explanation with screenshots and solutions. It explains the topic in the context of the player GameObject, but the same idea applies to NPCs, too.
Post Reply