void TurnOffSites() { for (int i = 0; i < sites.Length; i++) { Select_Site ss = sites[i].GetComponent <Select_Site>(); if (ss != null) { ss.TurnOffPopUp(); ss.loadScene = false; } } }
void TurnOffSites() { GameObject[] sites = GameObject.FindGameObjectsWithTag("Site"); for (int i = 0; i < sites.Length; i++) { Select_Site ss = sites[i].GetComponent <Select_Site>(); if (ss != null) { ss.TurnOffPopUp(); ss.loadScene = false; } } }