Skip to content

Instantly share code, notes, and snippets.

neruca

Block or report user

Report or block neruca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@neruca
neruca / blog20150111-4
Last active Jan 11, 2016
Unity Coroutine Question Answer
View blog20150111-4
IEnumerator Start () { // Start() の戻り値を IEnumerator 型にする!
Debug.Log ("CountStart !!");
Coroutine count1To5 = StartCoroutine (CountFrame1To5 ()); // StartCoroutine()の戻り値を一度Coroutine型に代入する!
Coroutine count201To205 = StartCoroutine (CountFrame201To205 ()); // 同上
yield return count1To5; // コルーチン終了まで待つ
yield return count201To205; // コルーチン終了まで待つ
Debug.Log ("CountEnd !!"); // 意図した通り、最終行に出力される!!
}
You can’t perform that action at this time.