Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Beck Lavender

2
Posts
8
Followers
2
Following
A member registered Nov 24, 2016 · View creator page →

Creator of

Recent community posts

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);

I've managed to work around this by saving to/loading from "idbfs/GameName" rather than Application.persistentDataPath in WebGL builds. I saw metinevren suggested that here too: https://forum.unity.com/threads/persistentdatapath-returns-different-paths-for-d...

HOWEVER, PlayerPrefs and a bunch of other unity stuff still use the persistentDataPath (eg "/idbfs/b647bc5784577....".) and I'm not sure how to change that. I'm not using PlayerPrefs so it's not an issue for me.

Also don't know if this workaround is icky for other reasons. But I can now upload new builds as much as I like and my savegame persists!