i've been trying to retrieve some data from a .JSON file. Im currently using Unity with SimpleJson and when I load up the game i get this error:
NullReferenceException: Object reference not set to an instance of an object PlayerInteraction.test () (at Assets/Scripts/PlayerInteraction.cs:93) PlayerInteraction.Start () (at Assets/Scripts/PlayerInteraction.cs:23)
here is the code:
void test(){
    string filepath = (Application.dataPath + "/listofgames.txt");
    TextAsset file = Resources.Load(filepath) as TextAsset;
    var node = JSON.Parse(file.text); //line 93
    var pl = node["apps"];
        Debug.Log("TEST: " + pl[0]);
}
 
     
    