Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9707

Editorでコルーチンを実行するツールを作ってみた【Unity】

$
0
0

EditorCoroutines

https://github.com/tani-shi/unity-editor-coroutines

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年以上メンテされていない?)、公式にパッケージがあるようです。

https://docs.unity3d.com/Packages/com.unity.editorcoroutines@0.0/manual/index.html


Viewing all articles
Browse latest Browse all 9707

Trending Articles