Dialogue UI missed when scene changed

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Lucian1899
Posts: 12
Joined: Wed Dec 13, 2023 9:23 am

Dialogue UI missed when scene changed

Post by Lucian1899 »

Hi there, I started using Dialogue System for a few days, that is really a terrific tool!But I have a problem now.

I do not know coding and I am a beginner of indie game, maybe this question is silly, please forgive me.

Now I have two scenes: Scene A & Scene B,and I put a Dialogue Manager in each sence, set Dialogue UI and Default Canvas, when I test them separately, they all work.

But when I finish dialogue in Scene A, and click a button jumping to Scene B, here is the problem: I could not trigger the dialogue in Scene B(by clicking a NPC's protrait),I found that the Dialogue UI and Default Canvas are missing in Scene B's Dialogue Manager Display settings, and the engine told me that "The object of type 'StandardDialogueUI' has been destroyed dialogue system but you are still trying to access it". Could you please tell me how to fix it? If it is related to save system? Thanks a lot!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue UI missed when scene changed

Post by Tony Li »

Hi,

I don't think it's related to the save system.

At runtime, the Dialogue Manager survives scene changes and replaces any Dialogue Manager that are in subsequently-loaded scenes. Make sure you've assigned the same database to the Dialogue Manager GameObjects in both scenes.

If possible, keep the dialogue UI and default canvas as children of the Dialogue Manager GameObject.
Lucian1899
Posts: 12
Joined: Wed Dec 13, 2023 9:23 am

Re: Dialogue UI missed when scene changed

Post by Lucian1899 »

Thx Tony, really appreciate it! Problem solved!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue UI missed when scene changed

Post by Tony Li »

Glad to help!
Post Reply