I have a Config.json file, when i try to parse it when it is in my local drive it works, but when i'm trying to parse it via www i get this error: "ArgumentException: JSON parse error: Invalid value."
Here is my current code:
public string gameSettingsUrl;
void Start()
{
WWW www = new WWW (gameSettingsUrl);
StartCoroutine(GetConfig(www));
}
IEnumerator GetConfig(WWW www)
{
yield return www;
jsonString = www.text;
Config Config = JsonUtility.FromJson<Config> (jsonString); // I get the error here...
Debug.Log (Config.GameName);
}
jsonString:
{
"GameName": "Smoke Of Death",
"GameVersion": 1.1,
"VipsCanSkip": true
}