Bypass Save / Load System?
-
- Posts: 2
- Joined: Mon Nov 26, 2018 4:13 pm
Bypass Save / Load System?
I'm looking to integrate Dialogue System with my existing save system. I only need to save the variable data from the database and apply it back to the database when I load. Ideally I could just get and set a serializable object from the database and pass it to my save system. Is there a straightforward way to do that? Thanks!
Re: Bypass Save / Load System?
Sure! You can remove any save components that might be on the Dialogue Manager GameObject (Dialogue System Saver, Save System, Data Serializer, Saved Game Data Storer) or just leave them there unused.
When saving a game, call this line of code to get the Dialogue System's data as a serialized string:
When loading a saved game, after you retrieve that string from your save system, call this line of code to put it back into the Dialogue System:
API Reference: PersistentDataManager
When saving a game, call this line of code to get the Dialogue System's data as a serialized string:
Code: Select all
string s = PixelCrushers.DialogueSystem.PersistentDataManager.GetSaveData();
Code: Select all
PixelCrushers.DialogueSystem.PersistentDataManager.ApplySaveData(s);
-
- Posts: 2
- Joined: Mon Nov 26, 2018 4:13 pm
Re: Bypass Save / Load System?
This sounds like just what I was looking for. Thanks for the quick reply!
Re: Bypass Save / Load System?
Glad to help!