public void CheckUI(TileEvent te) { tileEvent = te; popupUI.SetActive(true); popupUI.transform.GetChild(0).transform.GetChild(0).GetComponent <Text> ().text = te.GetNameE(); popupUI.transform.GetChild(1).transform.GetChild(0).GetComponent <Text> ().text = te.GetDescription(); if (tileEvent.GetTType().Equals("Void") || tileEvent.GetTType().Equals("Checked")) { popupUI.transform.GetChild(2).gameObject.SetActive(false); } else { popupUI.transform.GetChild(2).gameObject.SetActive(true); } }