This article is about game saves.
1. Only save the dialog state, task state, and variables of the dialog manager.
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class Save : MonoBehaviour
{
public void LoadGame()
{
//取档
string data = PlayerPrefs.GetString("DialogueData");
PersistentDataManager.ApplySaveData(data);
}
public void SaveGame()
{
//存档
string data = PersistentDataManager.GetSaveData();
PlayerPrefs.SetString("DialogueData", PersistentDataManager.GetSaveData());
}
public void ResetGame()
{
//重置游戏
DialogueManager.ResetDatabase(DatabaseResetOptions.KeepAllLoaded);
}
}
This is also my requirement. I only need to save the plug-in-related things, which is enough. There is no need to use this plug-in to save other files. It is recommended to use EasySave3 to save files, which is much more powerful than it.
two. The archive function that comes with the plug-in, I don't actually need it, but I have studied it and just mentioned it.
1. Add the following components to Dialogue Manager.