Anything similar to DS PersistentDataManager.GetSaveData()?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
random
Posts: 34
Joined: Thu May 09, 2024 10:48 pm

Anything similar to DS PersistentDataManager.GetSaveData()?

Post 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?)
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Anything similar to DS PersistentDataManager.GetSaveData()?

Post 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:

Code: Select all

using PixelCrushers;
To save data:

Code: Select all

string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
To restore:

Code: Select all

SaveSystem.ApplySavedGameData(SaveSystem.Deserialize<SavedGameData>(s));
random
Posts: 34
Joined: Thu May 09, 2024 10:48 pm

Re: Anything similar to DS PersistentDataManager.GetSaveData()?

Post 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!
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Anything similar to DS PersistentDataManager.GetSaveData()?

Post 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
Post Reply