//Applies changes from the file to the wall in game public override void ApplyChange() { BoxJson obj = ReadJSON <BoxJson>(this); //this.gameObject.transform.GetChild(0).gameObject.SetActive(obj.isActive); this.gameObject.transform.GetChild(0).GetComponent <Collider>().enabled = obj.canCollide; //text.text = obj.comment; }
//Applies changes from the file to the wall in game public override void ApplyChange() { string filepath = playerSelectedFilePath + "/" + jsonFileName + ".json"; string jsontext = System.IO.File.ReadAllText(filepath); BoxJson obj = readJSON(jsontext); //this.gameObject.transform.GetChild(0).gameObject.SetActive(obj.isActive); this.gameObject.transform.GetChild(0).GetComponent <Collider>().enabled = obj.canCollide; //text.text = obj.comment; }