docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Editor coroutines

    The Editor coroutines package enables the execution of iterator methods in the Unity Editor's Edit mode, in a similar way to running coroutines inside MonoBehaviour scripts at runtime.

    Installation

    To install the Editor coroutines package, follow the instructions in Add and remove UPM packages or featuresets.

    Using Editor coroutines

    The Editor coroutines package is currently documented as API documentation only. For more information on using Editor coroutines, including code examples, refer to the scripting API section of the documentation.

    Requirements

    This version of Editor coroutines is compatible with the following versions of the Unity Editor:

    • 2019.4 and later (recommended)

    Note: If you install the Memory Profiler package it will automatically install the Editor coroutines package as a dependency.

    Known limitations

    The iterator functions passed to Editor coroutines do not support yielding any of the instruction classes derived from YieldInstruction, such as WaitForSeconds and WaitForEndOfFrame. The only exception to this is classes derived from CustomYieldInstruction with the MoveNext method implemented.

    Additional resources

    • Runtime coroutines
    • Yield statement
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)