How do I save the dialog's variables using EasySave3?
Posted: Sat Dec 05, 2020 12:47 pm
I'm using Dialog System to integrate simple conversations and using variables to decide what NPCs say.
However, I want to save those variables (booleans and strings, etc...) of the conversations using EasySave3. I've tried so far to do so using this set up:
And I also tried writing this code:
With those two methods above, the NPC's conversations always start from the beginning, i.e, all variables are in their default state as if they were not saved. I just want the variables of the dialog database to be saved, I don't care much about the quest, locations, etc...
But I do want the basic stuff to be saved. Thank you
However, I want to save those variables (booleans and strings, etc...) of the conversations using EasySave3. I've tried so far to do so using this set up:
And I also tried writing this code:
Code: Select all
/////This is the script which calls saving after dialog and loads at start of scene
private void Start()
{
LoadDialog();
}
public void SaveDialog() //We call this method at the end of a dialog to save everything to the dialog base.
{
ES3.Save("DialogData", PersistentDataManager.GetSaveData(), "DialogData.neon");
}
public void LoadDialog() //We call this method at start, and at any other point we need.
{
if(ES3.KeyExists("DialogData", "DialogData.neon"))
{
PersistentDataManager.ApplySaveData(ES3.Load<string>("DialogData", "DialogData.neon"));
}
}
With those two methods above, the NPC's conversations always start from the beginning, i.e, all variables are in their default state as if they were not saved. I just want the variables of the dialog database to be saved, I don't care much about the quest, locations, etc...
But I do want the basic stuff to be saved. Thank you