From the shown script below, it shows a text “Hello World”. But this isn’t what i want. What i wanted is to make it shows an int value, not text. How to do it ? Thanks!
function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20), "Hello World!");
}
From the shown script below, it shows a text “Hello World”. But this isn’t what i want. What i wanted is to make it shows an int value, not text. How to do it ? Thanks!
function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20), "Hello World!");
}
This is not a Unity problem. Convert ( ToString() ) your int variable into a string before the GUI.Label line (or even inside it) and you are done.