private void Awake() { cellSelection = CellSelection.GetInstance(); unitsList = UnitsList.GetInstance(); unitSelection = UnitSelection.GetInstance(); for (int i = 0; i < toggles.GetComponentsInChildren <Toggle>().Length; i++) { foreach (Image image in toggles.GetComponentsInChildren <Toggle>()[i].GetComponentsInChildren <Image>()) { if (image.gameObject.name == "Image") { images[i] = image; } } } }