So i’m using json to save some data, and on pc it works completly fine, but on iOS it dosent apear to do anything.
This is the script I use to save it
string saveText = JsonUtility.ToJson ( new BuildInfo( build.width, build.height, build.idList) ); // Converts into json string
File.WriteAllText (Application.dataPath + "/IdList.txt", saveText); // Writes it into the file
SceneManager.LoadScene("Scene", LoadSceneMode.Single); // <-- this line never executes on ios, so error must be above
This is what the json file looks like on pc ( I can’t access the file on iOS so no idea how it looks there…)
{"width":9,"height":19,"idList":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
And this is the script I use to load, so far I have no idea if it works, because well, there is nothing to read
string loadedText = File.ReadAllText (Application.dataPath + "/IdList.txt");
BuildInfo loadedBuildInfo = JsonUtility.FromJson<BuildInfo>(loadedText);