Page 1 of 1

Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 8:23 pm
by pegassy
Hello,

I have started testing out the evaluation version of DS for my game project, and I am integrating several other assets in my game.

Currently DS seems to be having a problem with an asset named Easy Main Menu that I am also using in the same project. What happens is that after I go through the loading scene and main menu scene of the game, when the main game scene starts, there will be two Dialogue Managers created under "DontDestroyOnLoad" instead of one. This causes the main dialogue UI not to appear (I am using JRPG2) when the player engages in dialogue with the NPCs.

I narrowed down the problem to "Increment On Destroy" script which is used to detect when a quest objective is destroyed. If I take out that code out of that game object, then the second dialogue manager (the one with default dialgue UI(clone)) will not be loaded up, and the JRPG2 UI will show up.

Please advise on what I may do to fix the problem. Thanks in advance.

(Please see the attached photo for the two DM items in the hierarchy)

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 8:34 pm
by pegassy
I was able to replicate the same condition in DS Quest Example scene. When I tied it to Easy Main Menu, following the: Loading > Main Menu > Loading > Game Scene, sequence, there will be two Dialogue Managers. The second dialogue manager does not appear if I directly load the example scene.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 9:30 pm
by Tony Li
Hi,

I'm importing Easy Main Menu now to test it out.

In the meantime, do all instances of Dialogue Manager in your scenes have the Allow Only One Instance checkbox ticked?

Also, it looks like some part of the Dialogue System is being called before it gets to the scene with your Dialogue Manager. The Dialogue System will automatically create a default Dialogue Manager in this case. It looks like that may be what's happening. To resolve this, add an instance of your Dialogue Manager to the first scene that uses any Dialogue System functionality. This is the instance that will carry through to other scenes in the game, as long as its Dont Destroy On Load and Allow Only One Instance checkboxes are ticked.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 9:39 pm
by pegassy
Thank you so much for the tips. I will go give it a try and let you know what I found out.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 9:41 pm
by Tony Li
It looks like you just need to add the Dialogue Manager to LoadingScreen.

You can make it a prefab and also add instances of the prefab to any of your gameplay scenes (e.g., Maze) to make it easy to playtest those scenes.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 9:51 pm
by pegassy
Yes, I just confirmed that adding it to the loading screen fixed the issue. I was just about to ask you what to do for prototyping on game levels, and then just seen your new post :)

I will try to prefab it and use it in the game levels. Thank you for the prompt support and beautiful asset. I am greatly enjoying DS and hoping to buy the full version as soon as I can.

Feel free to take a look at how it is working out in the game @chasetailgames on Twitter.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 9:54 pm
by pegassy
Just confirming that prefabbing Dialogue Manager and adding it both on the Loading Screen and the game level at the same time still worked. I did not get a duplicate of the DM. I appreciate the help.

Re: Double Dialogue Managers in Hierarchy

Posted: Sat Mar 17, 2018 10:05 pm
by Tony Li
Glad to help. And thanks for evaluating the Dialogue System!