以下の内容はhttps://baba-s.hatenablog.com/entry/2017/12/28/145800より取得しました。


【Unity】エディタでコルーチンを使用できるようにする「EditorCoroutineRunner」紹介

ソースコード

使い方

using UnityEngine;
using UnityEditor;

public static class Example
{
    [MenuItem( "Tools/Example" )]
    private static void Hoge()
    {
        // コルーチン開始
        EditorCoroutineRunner.StartCoroutine( Fuga() );
        
        // コルーチン開始(進捗ダイアログ表示あり)
        EditorCoroutineRunner.StartCoroutineWithUI( Fuga(), "Fuga", true );
    }

    private static IEnumerator Fuga()
    {
        Debug.Log( "ピカチュウ" );
        yield return new WaitForSeconds( 1 );
        Debug.Log( "カイリュー" );
    }
}

関連記事




以上の内容はhttps://baba-s.hatenablog.com/entry/2017/12/28/145800より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14