IEnumerator waitandaddrequest(Collider other) { Vuforia.RetailItemScript productinfo = other.gameObject.transform.parent.GetComponent <Vuforia.RetailItemScript>(); yield return(new WaitForSeconds(1)); addDataToBar(productinfo.GetProductName(), productinfo.GetSales()); }
void OnTriggerEnter(Collider other) { if (ShowBarChart == false) { ShowBarChart = true; myBarchart.SetActive(true); } Vuforia.RetailItemScript productinfo = other.gameObject.transform.parent.GetComponent <Vuforia.RetailItemScript>(); if (productinfo.GetProductName() == "") { productinfo.filtProd(); waitandaddrequest(other); } else { addDataToBar(productinfo.GetProductName(), productinfo.GetSales()); } }