public void Hide() { if (group.gameObject.activeSelf && Utils2.FadeAllMaterialsAndUI(group, 0, 3)) { group.gameObject.SetActive(false); } }
void LateUpdate() { SetPopupPosition(); timeout -= Time.deltaTime; offsetTimeout -= Time.deltaTime; if (timeout < 0) { Hide(); } else { Utils2.FadeAllMaterialsAndUI(group, 1, 3); } }