using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TaskItem : MonoBehaviour { public JSONReader jr; public int id; public Text tasktxt; // Start is called before the first frame update void Start() { } private void OnClickButton() { } public void SetInfo(int id,JSONReader js) { this.id = id; jr = js; UpdateTxt(); } void UpdateTxt() { Language info = jr.GetTaskByID(id,jr.LanguageDictionary); tasktxt.text = info.Text; } // Update is called once per frame void Update() { } }