Quantcast
Channel: HAPPY*TRAP » Unity
Viewing all articles
Browse latest Browse all 10

[Unity] 任意の時間(秒)処理を止める

$
0
0
任意の時間(秒)待機したい場合は、WaitForSecondsが便利です。

[C#]
private IEnumerator GameOver() {
    print("Game Over!!");
    // 2秒間待機
    yield return new WaitForSeconds(2);
    Application.LoadLevel("Title");
}

※WaitForSecondsは、Updateメソッド内では使用できません。

Viewing all articles
Browse latest Browse all 10

Trending Articles