I just want to save the variables in my Dialogue Database between loads/scenes.
In the documentation it says:
If you only want to save the state of the dialogue database (e.g., dialogue database variables, quest states, and SimStatus), you can bypass the Save System and use PixelCrushers.DialogueSystem.PersistentDataManager instead:
Code: Select all
string s = PersistentDataManager.GetSaveData(); // Save state.
PersistentDataManager.ApplySaveData(s); // Restore state.
DialogueManager.ResetDatabase(DatabaseResetOptions.KeepAllLoaded); // Reset state.
In a script attached to the Dialogue Manager I put:
Code: Select all
string s;
void Update()
{
if (Input.GetKeyDown(KeyCode.S))
{
s = PersistentDataManager.GetSaveData(); // Save state.
}
if (Input.GetKeyDown(KeyCode.C))
{
PersistentDataManager.ApplySaveData(s); // Restore state.
}
}
I feel like I'm missing something here.
Thanks for any help
