public void ResetLevel() { foreach (Transform child in parentItems) { ItemControl control = child.GetComponent <ItemControl>(); if (control != null) { child.gameObject.SetActive(true); control.ResetItem(); } end.hasStarted = false; } CanPlay = false; }