Page 1 of 1
DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 11:27 am
by manta__fanta
Hi,
My Dialogue Manager's "Dialogue System Events" is having inconsistencies with enabling/disabling components and game objects On Conversation Start and End. In Unity, it works fine from what I can tell. But when i build the game, sometimes it works, sometimes it doesn't. For example freezing my player animator, hiding cursor, etc.
From what I can see there's no reason it should do this.
Thank you.
Re: DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 1:20 pm
by Tony Li
Hi,
Dialogue System Events OnConversationStart/End issues usually come down to which GameObjects are being used as the active conversation's actor and conversant.
If it's inconsistent between builds and the editor's play mode, try playing in the editor from the same starting scene that plays when you're in a build. It's possible that something in that scene is carrying over (settings, Dialogue Manager GameObject, etc.) that is causing problems.
You can also temporarily set the Dialogue Manager's Other Settings > Debug Level to Info, make a Development Build, and reproduce the issue. Then open the Player.log file and search for "Dialogue System: Starting conversation". Make sure it logs the correct actor and conversant GameObjects.
Re: DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 8:58 pm
by manta__fanta
Hi, thank you for that info.
I was able to recreate the problem in-editor by loading scene 1, then going into scene 2. Scene 2 is the one that has the problem. When loading Scene 2 by itself it works fine, so something is definitely carrying over from scene 1.
I tried disabling "Dont destroy on Load" in the dialogue manager, and that seemed to fix it. Are there any other repercussions from disabling this?
thanks!
Re: DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 9:08 pm
by Tony Li
There could be. In general, it's best (for performance if nothing else) to keep Don't Destroy On Load ticked. Just make sure that your Dialogue Manager in scene 1 is configured the same as the one in scene 2. I recommend saving your fully-customized Dialogue Manager as a prefab variant and using that same prefab variant in all scenes where you put a Dialogue Manager.
Also, don't make inspector assignments between scene objects and the Dialogue Manager. For example, if your player GameObject exists in scene 2, don't make assignments between the player in scene 2 and the Dialogue Manager in scene 2. When you arrive from scene 1, the Dialogue Manager in scene 1 will survive the scene change and replace the Dialogue Manager in scene 2, so assignments to the Dialogue Manager in scene 2 will no longer be valid.
Re: DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 9:20 pm
by manta__fanta
That makes so much more sense now. I see why its happening. Thank you!
Re: DialogueManager OnConversationStart/End inconsistencies
Posted: Tue Feb 22, 2022 9:27 pm
by Tony Li
Glad to help!