mathe/Library/PackageCache/com.unity.editorcoroutines@1.0.0/Documentation~/index.md
2024-09-20 20:30:10 +02:00

2.6 KiB

About Editor Coroutines

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.

Installing Editor Coroutines

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.

Using Editor Coroutines

To learn how to use the Editor Coroutines package in your project, please refer to the Scripting API section of the documentation.

Technical details

Requirements

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

  • 2018.1 and later (recommended)

Note

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

Known limitations

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.

Package contents

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.

Document revision history

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.