- Home /
Score UI update causes frames to skip IOS only
Hello,
So I'm using this techique to update my score. I never had any troubles with it, but this occured in a previous project of mine. I fixed it there by replacing the new UI with a GUIText, which did the trick, but for this project I can't use a GUIText.
So basicly what happends is when the player gets a score point and I update the UI, the game skips or laggs for a few frames. It doesn't load, it skips. Which is VERY annoying for the player!
Code is very basic:
void OnTriggerEnter2D(Collider2D col)
{
if (col.transform.tag == "Point")
{
JumpCarGameController.Instance.AddScore();
}
}
inside JumpCarGameController is following method:
public void AddScore()
{
score++;
GlobalGameGUI.Instance.UpdateScoreText(score);
}
And in GlobalGameGUI:
public void UpdateScoreText(int score)
{
inGamescoreText.text = score.ToString();
}
"inGamescoreText" is a text object of the new UI (since 4.6) unity, I linked it in the inspector like this:
Only happends on IOS, not in editor or android, also tested with multiple projects started froms scratch. Reinstalled unity twice but here I still am.
Your answer
Follow this Question
Related Questions
UI Text does not show up on IOS build. 0 Answers
Adjusting UI to cellphone screen size 0 Answers
IOS Unity 5 UI, Font/Text not displaying/Disappearing 3 Answers
4.6 UI Text rect does not expand automatically 2 Answers
uGUI letter spacing and kerning 1 Answer