public void Close() { ObjectPlacer op = GameObject.FindObjectOfType <ObjectPlacer>(); op.CloseUI(); //close all the elements on the hupcont to reset it. foreach (GameObject go in elements) { if (go) { go.SetActive(false); } } }