Page 1 of 1

OnConversationStart and OnConversationEnd events working in some scenes and not others

Posted: Sat Jul 02, 2022 4:18 am
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!

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

Posted: Sat Jul 02, 2022 8:45 am
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.