기술 자료

Unity Engine

Unity Engine

WaitForFixedUpdate

Suspends coroutine execution until the next fixed update.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public sealed class WaitForFixedUpdate : YieldInstruction

Remarks

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

Examples

using System.Collections;using UnityEngine;public class ExampleClass : MonoBehaviour{ public void Start() { StartCoroutine(Example_WaitForFixedUpdate_Coroutine()); } public IEnumerator Example_WaitForFixedUpdate_Coroutine() { Debug.Log("Start of WaitForFixedUpdate Example"); yield return new WaitForFixedUpdate(); Debug.Log("End of WaitForFixedUpdate Example"); }}