Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey I know this is super old but I'm using binary files to save. Does this look like roughly what you got working? I'm still having some trouble with this.

public void SaveGameStats()
{
    string saveFileName = "GameStats";
    string savePath = Application.persistentDataPath;
    #if UNITY_WEBGL
        savePath = "idbfs/Skull_Scavenger";
    #endif
    using (FileStream file = File.Create(Path.Combine(savePath, saveFileName)))
    {
        new BinaryFormatter().Serialize(file, curGameStats);
    }
}
(+1)

Hey! I haven't gone anywhere near this stuff in a long time so forgive lack of context but looks like I haaad...

#if UNITY_WEBGL         
    mPersistentDataPath = "idbfs/LittleThings"; 
#else         
    mPersistentDataPath = Application.persistentDataPath; 
#endif

aaaand...

SaveLoadUtility.CreateDirectory(mPersistentDataPath);             
SaveLoadUtility.SaveDataToBlob(appState, mPersistentDataPath + mSaveDataPath);
(+1)

Awesome thanks, the post you made actually helped me figure it out with info from a few other people.