![]() ![]() SaveData = formatter.Deserialize(file) as SaveData If (File.Exists (Application.persistentDataPath + "/save.dat"))īinaryFormatter formatter = new BinaryFormatter () įileStream file = File.Open (Application.persistentDataPath + "/save.dat", FileMode.Open) Create a route from the program to the files(data stream)įileStream file = File.Create(Application.persistentDataPath + "/save.dat") Create Binary formatter to read binary filesīinaryFormatter formatter = new BinaryFormatter() What happens is after closing the game and reopening it all saved integers go to 0, even the playable levels array integers which causes every level to appear unlocked but not playable essentially crashing and corrupting the save data. I've been researching for hours and looked at the device logs with debugs over and over with no concrete solution. Please look at my script and let me know if there is anything I can change to fix this. Out of all my friends only me and my fiance have experienced data loading corruptions on our galaxy phones. ![]() It even works on android for the most part. My save data script works fine on standalone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |