- Home /
GUIText appear too small on game screen
I have a problem where no matter how big I set the size of the GUIText, it remains the same miniature size on my phone. It is anchored to the upper left of the screen. I attached the GUIText to a normal game object. The script Im using is-
using UnityEngine;
using System.Collections;
public class ScoreSystem : MonoBehaviour {
static int score = 0;
static int highScore = 0;
static public void AddPoint(){
score++;
if (score > highScore) {
highScore = score;
}
}
void Start() {
PlayerPrefs.GetInt("highScore", 0);
}
void OnDestroy(){
PlayerPrefs.SetInt ("highScore", highScore);
PlayerPrefs.Save ();
score = 0;
}
void Update () {
guiText.text = "S:" + score + "\nHS:" + highScore;
}
}
Thanks, fatmanspineapple
Answer by Graham-Dunnett · Jan 14, 2015 at 01:01 PM
If you are using a dynamic font, then try:
http://docs.unity3d.com/ScriptReference/GUIText-fontSize.html
Dear Graham, I managed to fix this problem by playing with the scaling of the text. However my other problem still stands, I would like to display the highscore on a different screen as well And i was wondering how i could go about doing this/
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How do i remove the gui windows in my scene 1 Answer
Distribute terrain in zones 3 Answers
Setting Scroll View Width GUILayout 1 Answer
How to make loading screens? 1 Answer