- Home /
Question by
thetrueninjasheep · Aug 16, 2016 at 05:16 AM ·
4.6
GUIText in Unity 4.6.9
While working on my game, I was programming the score as a variable.
using UnityEngine;
using System.Collections;
public class Game_Controller : MonoBehaviour {
public GUIText ScoreText;
public int Score;
void Start () {
Score = 0;
UpdateScore ();
}
public void Addscore (int newScoreValue){
Score += newScoreValue;
UpdateScore ();
}
void UpdateScore () {
ScoreText.text = "Score: " + Score;
}
}
After I wrote that I looked at the empty object I attached this script to. When I looked in the optinos menu, the Text for my canvas was not available as an option
How should I work around this?
capture.png
(6.6 kB)
Comment