How to save dialogues manually and call a function on close application

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

How to save dialogues manually and call a function on close application

Post by rauljl1 »

Hi, Tony.
I have 2 issues.

When I close the application, my dialogues are saved, but my player custom data (which is in a function) not.
On the other hand, when I logout by a function, my player custom data are saved, but dialogues not.

public void saveLocal()
{
Save(jsonLocal);

//I tried this, but didn't work
PlayerPrefs.SetString("Save", PersistentDataManager.GetSaveData());
PlayerPrefs.Save();
}

1. I want to call Save(jsonLocal) on Exit like Save On Quit in the AutoSaveLoad.
2. I want to save dialogues manually in saveLocal(), but didn't work as you see.

Thanks.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to save dialogues manually and call a function on close application

Post by Tony Li »

Hi,

If you're using AutoSaveLoad, I recommend setting up the save system.

Then write a custom saver to save your player data.
Post Reply