This question already has an answer here:
I have two functions.The first function takes 2 seconds. Second function must wait until the second will finish. This is my following code.
void Update(){
StartCoroutine("something");
}
IEnumerator something()
{
First();
yield return null;
Second();
}
void First(){
for(long i=0;i<2131232123123123;i++){
print(i);
}
}
void Second(){print("Done");}