EditorCoroutines
using UnityEngine.Coroutines;
void Run()
{
EditorCoroutines.StartCoroutine(YourCoroutine());
}
IEnumerator YourCoroutine()
{
Debug.Log("Start Coroutine");
yield return new WaitForSecondsRealtime(1.0f);
Debug.Log("End Coroutine");
}
Getting started
Packages/manifest.json
に以下の行を追加してください。
"com.tani-shi.unity-editor-coroutines": "https://github.com/tani-shi/unity-editor-coroutines.git#1.0.0"
最後に
Preview版ですが(1年以上メンテされていない?)、公式にパッケージがあるようです。