The Editor Coroutines package allows the user to start the execution of iterator methods within the Editor similar to how we handle Coroutines inside MonoBehaviour scripts during runtime.
To install this package, follow the instructions in the Package Manager documentation.
Note: While this package is in preview, the Package Manager needs to be configured to show Preview Packages. (Under the Advanced drop-down menu, enable Show preview packages.) Then search for the Editor Coroutines package.
To learn how to use the Editor Coroutines package in your project, please refer to the Scripting API section of the documentation.
This version of Editor Coroutines is compatible with the following versions of the Unity Editor:
Note: If you install the Memory Profiler package it will automatically install the Editor Coroutines package as a dependency.
Editor Coroutines version 0.0.1-preview.2 includes the following known limitation(s):
The iterator functions passed to Editor Coroutines do not support yielding any of the instruction classes present inside the Unity Scripting API (e.g., WaitForSeconds, WaitForEndOfFrame), except for the CustomYieldInstruction derived classes with the MoveNext
method implemented.
Tip:
yield return null
is a way to skip a frame within the Editor.
The following table indicates the root folders in the package where you can find useful resources:
Location | Description |
---|---|
Documentation~ |
Contains the documentation for the package. |
Tests |
Contains the unit tests for the package. |
Date | Reason |
---|---|
June 20, 2019 | Removed deprecated manual link. |
Dec 7, 2018 | Api documentation added. Matches package version 0.0.1-preview.4. |
Oct 11, 2018 | Document created. Matches package version 0.0.1-preview.2. |