WaitForFixedUpdate 等待固定更新

Inherits from YieldInstruction

Waits until next fixed frame rate update function. See Also: FixedUpdate.

等待直到下一个固定帧速率更新函数。参见:FixedUpdate

WaitForFixedUpdate can only be used with a yield statement in coroutines.

在coroutine中WaitForFixedUpdate只能用于yield声明。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public IEnumerator Awake() {
		yield return new WaitForFixedUpdate();
	}
}
yield new WaitForFixedUpdate ();
Page last updated: 2010-12-25