Page 1 of 1

Steam Cloud Saves

Posted: Tue Apr 15, 2025 7:59 pm
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

Re: Steam Cloud Saves

Posted: Tue Apr 15, 2025 8:45 pm
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:

Re: Steam Cloud Saves

Posted: Sat Apr 26, 2025 11:29 am
by n_hagialas
Thank you Tony, that worked!

Re: Steam Cloud Saves

Posted: Sat Apr 26, 2025 11:47 am
by Tony Li
Awesome! Glad to help!