# Is a final yield return 0 required in corutines?

I have the following code run in a coroutine.

I would like to know if the last yield return 0 is necessary and why.

Thank you!

private IEnumerator pChangeFoV()
{
float duration = 0.7f;
float zValue = 5f;

for (float t = 0f; t < duration; t += Time.deltaTime)
{
float fNew = Mathf.Lerp(_camera.fieldOfView, zValue, t / duration);
_camera.fieldOfView = fNew;
yield return 0;
}
_camera.fieldOfView = zValue; //make sure we're really where we want to be

//now do everything that should be done after we're done with this coroutine

pEnableSomeScripts();

yield return 0; //is this final yield return 0 required???
}

• – Candid Moon _Max_ Feb 16 at 3:25
• Did you try deleting it to see what happens? ;) – DMGregory Feb 16 at 5:48
• Specifically to your case it might be important, but my comment was about general case. – Candid Moon _Max_ Feb 16 at 11:39