public void Delete(BattleUnitsStack b) { for (int i = 0; i < a.Length(); i++) { if (a.getcArmy()[i] == b) { a.Remove(i); Destroy(transform.GetChild(i).gameObject); return; } } }