IEnumerator glueBricks() { foreach (GameObject go in bricks) { Glue g = go.GetComponent <Glue>(); if (!g.GlueOnStart) { g.DoGlue(); } yield return(null); } }