Thanks everyone for helping.
What i did was get rid of the Do While loop and make it a if else in the update.
void Update ()
{
if (Input.GetKeyDown (KeyCode.Space))
startEndTurn = true;
if (startEndTurn == true)
CheckEndMov ();
}
void CheckEndMov ()
{
GameObject[] units;
units = GameObject.FindGameObjectsWithTag (unitTag);
if (allMovComp == true) {
Attack ();
startEndTurn = false;
allMovComp = false;
} else {
allMovComp = true;
foreach (GameObject unit in units)
{
if (unit.GetComponent <Move> ().notMovin == false)
allMovComp = false;
}
}
}