Prevent DoNotDestroy

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cheezorg
Posts: 9
Joined: Sun Sep 02, 2018 12:17 pm

Prevent DoNotDestroy

Post by cheezorg »

Quick question on DoNotDestroy.

Ticking/Unticking "DontDestoryOnLoad" in the Dialogue Manager Other Settings doesn't seem to do anything. Whether it's checked or uncheck, as soon as I hit Play in the Editor, the Dialogue Manager is placed into a new DoNotDestroy scene. How can I prevent this from happening?

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

Re: Prevent DoNotDestroy

Post by Tony Li »

Hi,

The Input Device Manager component also has a similar checkbox, Singleton, that acts as a combined checkbox for Dont Destroy On Load and Allow Only One Instance. If it's ticked, untick it.

If your Dialogue Manager has a Save System component, move it to a separate GameObject because it, too, wants to be DontDestroyOnLoad so it can handle scene transitions and scene loading.
cheezorg
Posts: 9
Joined: Sun Sep 02, 2018 12:17 pm

Re: Prevent DoNotDestroy

Post by cheezorg »

Thanks! That did it.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Prevent DoNotDestroy

Post by Tony Li »

Great! In the next release, if Dont Destroy On Load is unticked, the Dialogue Manager will log a warning if it also has an Input Device Manager whose Singleton checkbox is ticked.
Post Reply