Steam Cloud Saves

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
n_hagialas
Posts: 40
Joined: Wed May 03, 2017 4:34 pm

Steam Cloud Saves

Post by n_hagialas »

Hi Tony,

We're trying to understand how to set up Steam cloud saves, but we're having trouble understanding where exactly our game saves save files. We see a game path at 'C:\Users\Me\AppData\LocalLow\Company\Game' but all that we've found in that folder is a 'Unity' folder, a 'Player.txt', and a 'Player-prev.txt'.

We use the PlayerPrefsSavedGameDataStorer and the Save System components on our DialogueManager gameObject, and we use SaveSystemMethods.SaveSlot(0) to save Dialogue Database values to slot (we only have 1 save slot).

On the Steam cloud setup I need to put in a location on a user's pc where the game files would save, so I was curious where the DialogueSystem serializes and saves the data on disk.

Thanks!
-Nik
User avatar
Tony Li
Posts: 22985
Joined: Thu Jul 18, 2013 1:27 pm

Re: Steam Cloud Saves

Post by Tony Li »

Hi Nik,

PlayerPrefsSavedGameDataStorer stores saved games in PlayerPrefs, not directly in disk files. On Windows, for example, Unity stored PlayerPrefs data in the Windows Registry.

Remove the PlayerPrefsSavedGameDataStorer, and add a DiskSavedGameDataStorer in its place. You can change the "Store Save Files In" dropdown to set a custom path where it stores files. I really should add a "Steam Cloud Save Folder" option in the dropdown. I'll try to get that into a future version.

If you want to migrate players' existing saved games from PlayerPrefs to disk:

1. Add a PlayerPrefsSavedGameDataStorer component to a separate GameObject -- not the GameObject with the SaveSystem component.

2. At runtime, call this PlayerPrefsSavedGameDataStorer's RetrieveSavedGameData(slot#) method to get the saved game data from PlayerPrefs.

3. Then call the DiskSavedGameDataStorer.StoreSavedGameData(slot#, savedGameData) to save that data to a disk file. Since the DiskSavedGameDataStorer will be on the same GameObject as the SaveSystem, you can use PixelCrushers.SaveSystem.storer.StoreSavedGameData(slot#, savedGameData).


Here are some other links that aren't exactly related but might be helpful:
Post Reply