Application.persistentDataPath
Hey all, I have a confusing problem which I have not found a solution for anywhere on the internet, basically I have a script that is suppose to save the game settings that the user picks into a .json folder so they can easily edit it. I have written out all the code and get no errors, I have checked the player settings and the company name is correct and the game title is also correct however, when I go to AppData then LocalLow, I click on the company name folder but there is no folder for my game, it is just blank. I have ran the game and used the options but the folder does not appear so my question is what do I have to do to make this gamesettings.json folder visible. Here is the part of the script: Thanks in advance!
public void SaveSettings()
{
string jsonData = JsonUtility.ToJson(gameSettings, true);
File.WriteAllText(Application.persistentDataPath + "/gamesettings.json", jsonData);
}
On which OS are you running the game? And did you make a typo when you wrote "make this gamesettings.json folder visible" because gamesettings.json is a file and not a folder?
Your answer
Follow this Question
Related Questions
Unity for each JSONnode in JSONObject 0 Answers
how to parse a json feed 1 Answer
error in c# for creating list of quiz data 2 Answers
Null Exception while serialize json string into txt file 0 Answers