Should i use yield everytime?

Hi, iam having a little bit of a problem. Here is my code right away;

System.IO.File.Move (patch1, patch2);
System.IO.File.Delete(patch1);

So the first line copies the file instead of just moving it into patch2. Because of that i am trying to delete it.Second line is supposed to be deleting the file which is patch1 but it is not. If i add a yield between the lines then it works i dont know why? Its taking long that is longer than a frame so it passes the second line sth? Why is this happening? Any idea?

File.Move should move the file, not merely copy it. You should not require a File.Delete call after File.Move.

See the example test in provided link. Maybe you can convert it to using Debug.Log instead of Console.WriteLine and see if you can see all of the console output.

Also check if you get any errors in the console to begin with, like exceptions.

See the list of exceptions in that documentation and see if you get any of those.