Time.timeScale = 0;のときにどのUpdateが動いて、どのUpdateが止まるのかを調べた
3大UpdateについてLogを仕込む。
void Update () { Debug.Log ("Update"); } void LateUpdate() { Debug.Log ("LateUpdate"); } void FixedUpdate() { Debug.Log ("FixedUpdate"); }
結果、
Update => 動く
LateUpdate => 動く
FixedUpdate => 動かない
FixedUpdateのみ止まる。
もし、Updateでpositionを変化させる処理をした場合は、
speed * Time.deltaTimeみたいに、Time.deltaTimeを仕込むのが一般的のようだ。
OnGUIに関しても、timeScaleが0の時に効果が無い。
http://answers.unity3d.com/questions/15310/creating-a-pause-menu-problem-using-timetimescale.html