Hey Tony,
What is the best practice for handling quitting to the mail menu? I'm trying to get everything that's "Don't Destroy On Load" back to its factory settings when the main menu loads.
Right now after doing all that the Scene Transition Manager stored on the Dialog Manager breaks. I'm guessing that the dialog manager is still under Don't Destroy On Load.
So how should I deal with it? Should I destroy it before I load the Main Menu scene (that's where the DM is, I don't load it dynamically)
Best practice for quitting to main menu
Re: Best practice for quitting to main menu
You can keep the original Dialogue Manager alive. Use this to reset it:
If you're not using the save system, you can skip the second line.
Code: Select all
DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
SaveSystem.ClearSavedGameData();
Re: Best practice for quitting to main menu
perfect!
One other issue. The StandardSceneTransitionManager loses the references to the objects and methods it uses for transition start and end triggers. Is there a way to set that via script?
One other issue. The StandardSceneTransitionManager loses the references to the objects and methods it uses for transition start and end triggers. Is there a way to set that via script?
Re: Best practice for quitting to main menu
If possible, put it all under the Dialogue Manager, like in DemoScene1. This way it sticks around through scene changes.
If that's not possible, you'll need to reassign events to the transition manager's onTransitionStart/onTransitionEnd events and/or leaveSceneTransition/enterSceneTransition fields. What references are getting lost?