- Home /
Question by
psykojello2 · Mar 10, 2015 at 12:16 AM ·
webplayerfacebookpersistentdatapath
persistentDataPath for web (facebook) app
I have a game that I intend to run on multiple platforms. For testing, I copy a webplayer build of the project to Parse and link to it as a Facebook app.
When I try to save a save file to the Application.persistentDataPath, nothing happens. Should I use something other than persistentDataPath for the webplayer?
Here's the code in question:
var saveFile = Application.persistentDataPath+"/storeItems.dat";
BinaryFormatter bf = new BinaryFormatter();
FileStream fs = File.Create(saveFile);
bf.Serialize(fs, this); //'this' is a serializable class with a serializable list member
fs.Close();
When I debug Application.persistentDataPath, it's an empty string.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613185640im_/https://answers.unity.com/themes/thub/images/avi.jpg)