Page 1 of 1
Anything similar to DS PersistentDataManager.GetSaveData()?
Posted: Mon Jul 08, 2024 5:23 pm
by random
Is there anything in Quest Machine similar to the Dialogue Systems PersistentDataManager.GetSaveData() method? (not the right place, but is there something similar in Love/Hate as well?)
Re: Anything similar to DS PersistentDataManager.GetSaveData()?
Posted: Mon Jul 08, 2024 8:24 pm
by Tony Li
Hi,
Yes, in all three you can set up the
save system. (That link is for DS because it's handy to link to, but the basic setup is the same for any of three.)
Then put this line at the top of your script:
To save data:
Code: Select all
string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
To restore:
Code: Select all
SaveSystem.ApplySavedGameData(SaveSystem.Deserialize<SavedGameData>(s));
Re: Anything similar to DS PersistentDataManager.GetSaveData()?
Posted: Mon Jul 08, 2024 8:29 pm
by random
Oh gotcha. Here I am not reading into things enough haha. I assumed the save system was strictly independent and couldn't be integrated into the save system I already build. Oops. Appreciate the clear and quick reply!
Re: Anything similar to DS PersistentDataManager.GetSaveData()?
Posted: Mon Jul 08, 2024 8:34 pm
by Tony Li
Glad to help!
A tip: If you're handling scene loading yourself, UNtick the Save System component's "Save Current Scene" checkbox.
Also, see:
How To: Change Scenes With Save System