Page 1 of 1

Question About the saving system

Posted: Fri Jan 27, 2023 10:09 am
by JamesTFreaknKirk
Hello!

I'm currently using the save system that you have put in the dialogue system to specifically save the dialogue. and so far its working great! super easy to use. I already have a save system in my game however that uses a binary formatter and saves the gamesave to the Appdata/LocalLow/GameName/ folder, so I can use the app on my phone

This may be a bit of a noob question :P , but
Where does the dialogue system saver save its data? and can I change that to the folder I'm already using?


Regards,

Re: Question About the saving system

Posted: Fri Jan 27, 2023 12:05 pm
by Tony Li
Hi,

The save system's ***SavedGameDataStorer component stores saved games. There are different ****SavedGameDataStorer components. If you use a PlayerPrefsSavedGameDataStorer, it will store saved games in PlayerPrefs. If you use a DiskSavedGameDataStorer, it will store saved games to disk. You can specify where on disk to store them. By default, it's in Unity's persistent data path. If you haven't added a ****SavedGameDataStorer component to the same GameObject that has the SaveSystem component, the SaveSystem component will automatically add a PlayerPrefsSavedGameDataStorer.

You can also write your own ****SavedGameDataStorer component (make it a subclass of SavedGameDataStorer) if you'd like to store data differently.

Side note: Be careful with BinaryFormatter. Deserialization risks in use of BinaryFormatter