I’m starting a coroutine inside a monobehaviour, in which I print frame count in the beginning and in the end. In-between I have a WaitForEndOfFrame. Wierdly, the frame counter is the same. How is that possible?
private IEnumerator SampleCoroutine()
{
Debug.Log(Time.frameCount);
yield return new WaitForEndOfFrame();
Debug.Log(Time.frameCount);
}
More wierdly yield return null works correctly here. I saw before this topic yield return null vs yield return WaitForEndOfFrame - Questions & Answers - Unity Discussions and I thought they are similar and should always return and wait to the next frame.