public List childrens = new List(); void Update() { if(/* Something */) { foreach (var obj in childrens) obj.SetActive(false); } }