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
↧