CG-Tespy / FungusSlotBasedSaveSystem_Unity

A replacement for the built-in Fungus Save System that is closer to the standard save systems you see in games.
MIT License
14 stars 3 forks source link

Save File Location? #8

Closed cbetty702 closed 4 years ago

cbetty702 commented 4 years ago

Hello (first of all, so sorry if this is the wrong place to put this!),

I'm trying to locate where the save file would be located? I needed to use its filepath and filename so that I could script a code to automatically upload it to my backend whenever an update to a save is created.

The game itself is WebGL, and I plan on having users log in to the game, which is why it's so important for me to be able to upload it (ex. if there were two players in one household, I'm worried that it could be overwritten, or if they clear their browser's data/cookies, I'm worried that they could lose their progress with no way of retrieving it).

I've been scouring the Reader and Writer scripts for about a week now to get a clue of where to get started, but I'm not making much headway. Any help appreciated! ^U^

CG-Tespy commented 4 years ago

By default, the save files are put in a folder called "saveData" in the Assets folder.

On Sun, Sep 27, 2020 at 3:44 PM Celia B notifications@github.com wrote:

Hello (first of all, so sorry if this is the wrong place to put this!),

I'm trying to locate where the save file would be located? I needed to use its filepath and filename so that I could script a code to automatically upload it to my backend whenever an update to a save is created.

The game itself is WebGL, and I plan on having users log in to the game, which is why it's so important for me to be able to upload it (ex. if there were two players in one household, I'm worried that it could be overwritten, or if they clear their browser's data/cookies, I'm worried that they could lose their progress with no way of retrieving it).

I've been scouring the Reader and Writer scripts for about a week now to get a clue of where to get started, but I'm not making much headway. Any help appreciated! ^U^

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CG-Tespy/Fungus-Slot-based-Save-System/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLBGF4HLFAYXCN3AQBM4ADSH6IY7ANCNFSM4R3XU5TA .

CG-Tespy commented 4 years ago

Ah, sorry I didn't give a more specific answer before. For desktop systems, the game saves to the directory that Application.dataPath returns. For all other systems, it's the directory Application.persistentDataPath returns. Look in the SaveManager script's SaveDirectory property to see the code (make sure you're looking at my save system's SaveManager, not Fungus's built-in SaveManager).

On Sun, Sep 27, 2020 at 3:44 PM Celia B notifications@github.com wrote:

Hello (first of all, so sorry if this is the wrong place to put this!),

I'm trying to locate where the save file would be located? I needed to use its filepath and filename so that I could script a code to automatically upload it to my backend whenever an update to a save is created.

The game itself is WebGL, and I plan on having users log in to the game, which is why it's so important for me to be able to upload it (ex. if there were two players in one household, I'm worried that it could be overwritten, or if they clear their browser's data/cookies, I'm worried that they could lose their progress with no way of retrieving it).

I've been scouring the Reader and Writer scripts for about a week now to get a clue of where to get started, but I'm not making much headway. Any help appreciated! ^U^

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CG-Tespy/Fungus-Slot-based-Save-System/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLBGF4HLFAYXCN3AQBM4ADSH6IY7ANCNFSM4R3XU5TA .

cbetty702 commented 4 years ago

Alright, thank you so much! :)