言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

WaitForSeconds

Namespace: UnityEngine

/

Inherits from: YieldInstruction

Description

指定した秒数待ちます。

WaitForSeconds はコルーチンの yield ステートメントとともにしか使用できません。

// Prints 0
print (Time.time);
// Waits 5 seconds
yield WaitForSeconds (5);
// Prints 5.0
print (Time.time);

Constructors

WaitForSeconds 特定の秒数だけ待機するという yield 指示を作成します。

Inherited members