Question by
TomatuAlus · Feb 24, 2016 at 05:39 PM ·
texttimer countdowntimer-scriptshake
Text UI shakes when being updated with a countdown function
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Timer : MonoBehaviour {
public Text TimerLabel;
public float timer = 10f;
public float timera;
void Start () {
}
void Update () {
timer -= Time.fixedDeltaTime;
TimerLabel.text = timer.ToString();
}
}
I have an UI text attached to this script and when it updates, it likes to shake a bit. I have tried various optimizations, like new fonts (mono-something font which has letter all in the same size) and trying various options in text object. (Best fit, Align by geometry)
By shaking i mean it goes up and down and some countdowns from 10 to 7 it shakes a bit, from 7 to 2 it doesn't and from 2 to 0 it also shakes a bit.
Comment