Saving variable state with Easy Save?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
datchcole
Posts: 10
Joined: Tue Jun 15, 2021 2:05 am

Saving variable state with Easy Save?

Post by datchcole »

Hello! I saw in the manual that there is integration between Easy Save and the Dialogue System. I want to be able to save the variable boolean values of the Dialogue system to load later.

I saw these:

Code: Select all

using PixelCrushers;
//////save

string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());

////load

SaveSystem.ApplySavedGameData(SaveSystem.Deserialize<SavedGameData>(s));
Would I be able to use these in separate scripts I have for saving and loading? I figured this might work for saving:

Code: Select all

		string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
		ES3.Save("dialogueState" , s);
But not sure how loading would quite work, and I'm not quite sure this will even do what I want. I don't want to use the save system from the Dialogue Manager.

---------------
Alternatively is this doesn't quite do what I think it does, is there a shortcut to getting all the current variable values in the Dialogue System in a script? Any help is much appreciated.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Saving variable state with Easy Save?

Post by Tony Li »

Hi,

Please see: Easy Save Support.

If you're already doing your own saving and loading, and you only want to add saving/loading of Dialogue System variables, use the Alternate Setup.
Post Reply