// Start is called before the first frame update public void Initialize(Cake cake) { title.text = cake.title; desc.text = cake.desc; StartCoroutine(NetworkAPI.GetImage(cake.image, downloadedImage => image.sprite = downloadedImage)); GetComponent <Button>().onClick.AddListener(() => ListEntrySelected.Invoke(cake)); }
private IEnumerator PopulateScrollView() { yield return(StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}")))); CreateCakeListEntry(); }
private void ParseData() { StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}"))); }