Yield return to wait for some frame problem

I use yield return to wait for some frame, then execute next . but it seems there is no difference between yield return 0, yield return 1 or
yield return 1000, when i output the frame count, they all just increase 1.
here is my test code :

	public void Test()
	{
		StartCoroutine(ExecuteTest());
	}
	
	IEnumerator ExecuteTest()
	{
		Debug.Log("testing = " + Time.frameCount);
		yield return 0;
		
		Debug.Log("testing = " + Time.frameCount);
		yield return 1000;
		
		Debug.Log("testing = " + Time.frameCount);
	}

anyone know what’s the problem ?

Here is small helper class to wait for frames:

public static class WaitFor
{
    public static IEnumerator Frames(int frameCount)
    {
        while (frameCount > 0)
        {
            frameCount--;
            yield return null;
        }
    }
}

You can use it like that:

 public IEnumerator CoroutineAction()
 {
     // do some actions here    
     yield return StartCoroutine(WaitFor.Frames(5)); // wait for 5 frames
     // do some actions after 5 frames
 }

Source: [Unity3d] WaitForFrames in Coroutine

You are obviously using C#. You cannot yield a certain number of frames that way. You need to use a loop:

for (int i=0; i<1000; i++)
{
    yield return null;
}