I was wondering how I can preserve the quest states from one scene to another?
I'm making a 2D space game where each solar system is a different scene and often you will get a quest in one scene but the goal is in another scene.
On the Quest Journal I did mark the checkbox "Save across scene changes" but when I change scene, the journal is empty.
Also when I get back to the original scene, I have to accept the quest again.
What config do I need to do to make sure the quests are preserved across scenes?
Preserve quest status over scene change
Re: Preserve quest status over scene change
Hi,
Add a SaveSystem component to your Quest Machine GameObject if it doesn't already have one.
Then change the scene using a ScenePortal component or PixelCrushers.SaveSystem.LoadScene() in C#.
This will make the "Saver" components in the original scene save their info to Quest Machine's save system before loading the new scene. After the new scene is loaded, the Saver components in the new scene will retrieve their saved info, if any, from Quest Machine's save system. The player's Quest Journal will act as a Saver component if "Save Across Scene Changes" is ticked.
Add a SaveSystem component to your Quest Machine GameObject if it doesn't already have one.
Then change the scene using a ScenePortal component or PixelCrushers.SaveSystem.LoadScene() in C#.
This will make the "Saver" components in the original scene save their info to Quest Machine's save system before loading the new scene. After the new scene is loaded, the Saver components in the new scene will retrieve their saved info, if any, from Quest Machine's save system. The player's Quest Journal will act as a Saver component if "Save Across Scene Changes" is ticked.
Re: Preserve quest status over scene change
Awesome, thx! Works like a charm.
Re: Preserve quest status over scene change
Happy to help!