---
title: yield 명령어 레퍼런스
product: Unity Editor
version: '6000.0'
latest_version: '7000.0'
status: This page documents version 6000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/ko-kr/engine/6000.0/manual/scripting/object-oriented-development/coroutines-section/coroutines-yield-instructions
latest_url: https://docs.unity.com/ko-kr/engine/7000.0/manual/scripting/object-oriented-development/coroutines-section/coroutines-yield-instructions.md
generated_at: 2026-11-19T13:46:19.273Z
locale: ko-kr
---

# yield 명령어 레퍼런스

> 코루틴 메서드에서 다양한 커스텀 명령어를 제공하여 재개 시점을 제어합니다.

코루틴은 `yield return` 선언으로 실행을 중단합니다. `yield return null`는 다음 프레임까지 코루틴의 실행을 일시 중지합니다. 그러나 `yield return`는 Unity 에디터 또는 런타임에 지시를 반환하여 예를 들어 지정된 시간을 기다리거나 조건이 충족될 때까지 코루틴 실행을 재개할 수 있습니다.

## 런타임 출력 지침##runtime-yield-instructions

Unity에는 지정된 시간 후, 지정된 조건이 충족되었을 때 또는 플레이어 루프의 특정 지점에서 다시 시작하는 데 사용할 수 있는 [`UnityEngine.YieldInstruction`](/engine/6000.0/script-reference/unityengine/yieldinstruction.md)에서 파생된 커스텀 yield 명령어 세트가 있습니다.

| 명령                                                                                                | 설명                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`AsyncOperation`](/engine/6000.0/script-reference/unityengine/asyncoperation.md)                 | 씬이나 에셋을 로드하는 등 비동기 작업이 완료되면 코루틴을 일시 중지하고 재개합니다.                                                                                                                              |
| [`WaitForEndOfFrame`](/engine/6000.0/script-reference/unityengine/waitforendofframe.md)           | 모든 렌더링 및 GUI 이벤트 후에 코루틴을 일시 중지하고 프레임 끝에서 다시 시작합니다.**참고**: 스크립트가 `[ExecuteInEditMode]` 또는 `[ExecuteAlways]`로 표시되어 있더라도 에디터가 배치 모드일 때는 편집 모드에서 `WaitForEndOfFrame`가 실행되지 않습니다. |
| [`WaitForFixedUpdate`](/engine/6000.0/script-reference/unityengine/waitforfixedupdate.md)         | 모든 물리 계산 후 코루틴을 일시 중지하고 다음 물리 업데이트가 끝날 때 다시 실행됩니다.                                                                                                                           |
| [`WaitForSeconds`](/engine/6000.0/script-reference/unityengine/waitforseconds.md)                 | 코루틴을 일시 중지하고 시간 스케일을 고려하여 지정된 수의 초 후에 다시 시작합니다.                                                                                                                              |
| [`WaitForSecondsRealtime`](/engine/6000.0/script-reference/unityengine/waitforsecondsrealtime.md) | 코루틴을 일시 중지하고 지정된 수의 초 후에 재개하며 시간 스케일을 무시합니다.                                                                                                                                 |
| [`WaitUntil`](/engine/6000.0/script-reference/unityengine/waituntil.md)                           | 제공된 델리게이트가 `true`에 평가할 때 코루틴을 일시 중지하고 재개합니다.                                                                                                                                 |
| [`WaitWhile`](/engine/6000.0/script-reference/unityengine/waitwhile.md)                           | 제공된 델리게이트가 `false`에 평가할 때 코루틴을 일시 중지하고 재개합니다.                                                                                                                                |

이 yield 지침의 자세한 내용과 사용 예시는 API 레퍼런스 페이지를 참조하십시오.

플레이어 루프에서 다른 코루틴이 재개되는 위치를 시각적으로 나타내려면 [이벤트 함수 실행 순서](/engine/6000.0/manual/scripting/object-oriented-development/managing-update-order/execution-order.md)의 다이어그램을 참조하십시오.

## UnityTest yield 지침##unitytest-yield-instructions

`[UnityTest]` 속성으로 표시된 Unity Test Framework 테스트는 코루틴으로 실행됩니다. Test Framework 패키지는 Unity 에디터 테스트에서 제어하기 위한 추가 yield 명령에 대한 지원을 추가하며, 커스텀 yield 명령을 정의할 수 있는 기능을 제공합니다.

| 명령                                                                                                                                                                  | 설명                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [`EnterPlayMode`](https://docs.unity3d.com/Packages/com.unity.test-framework@latest/index.html?subfolder=/api/UnityEngine.TestTools.EnterPlayMode.html)             | Unity 에디터 플레이 모드를 시작하도록 yield 명령어를 생성합니다. |
| [`ExitPlayMode`](https://docs.unity3d.com/Packages/com.unity.test-framework@latest/index.html?subfolder=/api/UnityEngine.TestTools.ExitPlayMode.html)               | Unity 에디터 플레이 모드를 종료하도록 yield 명령을 생성합니다.  |
| [`RecompileScripts`](https://docs.unity3d.com/Packages/com.unity.test-framework@latest/index.html?subfolder=/api/UnityEngine.TestTools.RecompileScripts.html)       | Unity 에디터 스크립트 재컴파일을 트리거합니다.              |
| [`WaitForDomainReload`](https://docs.unity3d.com/Packages/com.unity.test-framework@latest/index.html?subfolder=/api/UnityEngine.TestTools.WaitForDomainReload.html) | 들어오는 도메인이 다시 로드될 때까지 스크립트 실행을 지연합니다.      |

Unity Test Framework에서 제공하는 yield 지침에 대한 자세한 내용은 [Editor의 yield 지침](/engine/6000.0/manual/reference-custom-yield-instructions.md)을 참조하십시오.

## 에디터 yield 지침##editor-yield-instructions

Editor Coroutines 패키지는 Unity 에디터 편집 모드에서 실행되는 코루틴에 대한 지원을 추가합니다. 이 패키지에는 Edit 모드 코루틴에 대한 추가 yield 명령이 포함되어 있습니다.

| 명령                                                                                                                                                                              | 설명                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [`EditorWaitForSeconds`](https://docs.unity3d.com/Packages/com.unity.editorcoroutines@latest/index.html?subfolder=/api/Unity.EditorCoroutines.Editor.EditorWaitForSeconds.html) | 지정된 수의 초 후에 시간 스케일을 고려하여 EditorCoroutine을 재개합니다. |

자세한 내용은 [Editor Coroutines](https://docs.unity3d.com/Packages/com.unity.editorcoroutines@latest)를 참조하십시오.

## 배치 모드 지원##batch-mode-support

스탠드얼론 [플레이어를 배치 모드](/engine/6000.0/manual/unity-editor/command-line-arguments/player.md)에서 실행할 때 모든 런타임 코루틴 출력 명령어가 정상적으로 실행됩니다.

[에디터를 배치 모드](/engine/6000.0/manual/unity-editor/command-line-arguments/editor.md#batchmode)로 실행하고 프로젝트에 편집 모드에서도 실행되도록 스크립트가 [`[ExecuteInEditMode]`](/engine/6000.0/script-reference/unityengine/executeineditmode.md) 또는 [`[ExecuteAlways]`](/engine/6000.0/script-reference/unityengine/executealways.md)로 표시된 경우 해당 스크립트의 모든 런타임 코루틴은 `WaitForEndOfFrame`를 제외하고 편집 모드로 실행됩니다. 이는 모든 Unity 하위 시스템이 런타임 시점만큼 편집 모드에서 정기적으로 업데이트되지 않기 때문입니다. 자세한 내용은 [`[ExecuteAlways]`](/engine/6000.0/script-reference/unityengine/executealways.md) API 레퍼런스를 참조하십시오.

## 추가 리소스##additional-resources

* [커맨드 라인 인자](/engine/6000.0/manual/unity-editor/command-line-arguments.md)
* API 레퍼런스
