- Home /
Serialized data not getting saved in iPhone
Hi, I tried to serialize game data as mentioned in the link:
http://answers.unity3d.com/questions/8480/how-to-scrip-a-saveload-game-option.html
1) It does work in PC/Mac system but does not seem to work in iPad.
2) Also sometime it does prompts this error in PC/Mac: "SerializationException: serializationStream supports seeking, but its length is 0"
when the file is deserialized.
Any suggestions would be helpful :)
Answer by DeveloperVic · Jun 18, 2013 at 03:20 AM
Hi, The main problem was that it was not getting the access right to modify the file when the path was given as: Application.datapath + "SaveFile"
After changing it to Application.persistentDatapath +"/"+ "SaveFile" it was working fine.
In windows the directory location is somewhat like:
Users/../ AppData /LocalLow/DefaultCompany/ProjectName/SaveFile
For now its working in iPad and the problem is solved :)
Your answer
Follow this Question
Related Questions
Save and load serialization problem 0 Answers
Save/load playerprefs 2 Answers
Saving/Load using menu C# 1 Answer
Serialized class to google games services cloud save 0 Answers
Serialization/Deserialization Problems 0 Answers