How can I get an int to be taken from this JSON file that I have? How can I define it before I put in the file reading command so that it compiles?
Here is where I am trying to run the command:
public void AddTestEntry()
{
AddEntry(new ScoreboardEntryData()
{
entryName = File.ReadAllText(Application.dataPath + "/NewName.json"),
entryScore = ScoreJSON.Amount;
});
which of course this does not compile where I am trying to tell the int to equal the number from this JSON file.
Here is my system.serializable json cs script:
[System.Serializable]
public class ScoreJSON
{
public string Amount;
}