unity : waitforsecondsが動かない時

ちょっと
IEnumerator Example() {
print(Time.time);
yield return new WaitForSeconds(5);
print(Time.time);
}

がなぜか動かない・・・

WaitForEndOfFrame
は問題なく動く

なんでかな・・・と思っていたら停止処理で

Time.timeScale = 0;
としていたので動かなかった。

待ちのときだけ timeScale を1に戻して。
WaiteForSeconds(1);
の後に timeScale を 0に戻した。
ゲーム中のポーズではこれは使えないけど・・・終了後の得点表示なので今回はこれで。

This entry was posted on 火曜日, 10月 21st, 2014 at 7:25 PM and is filed under unity. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。