- Home /
Question by
wizardgames · Jul 16, 2016 at 06:52 AM ·
uitextunity5variable
How to connect a variable to a UI text object
I am trying to display my Currency variable in a UI text. I tried:
using UnityEngine; using UnityEngine.UI; using System.Collections;
public class Currency_Text : MonoBehaviour {
public Text Currency_Text_obj;
// Use this for initialization
void Start () {
Currency_Text_obj.text = " " + currency.Currency;
}
But it did not work.
Comment