- Home /
Question by
phaitonican · Jun 27, 2012 at 11:33 AM ·
guistringint
Problem with Bullets on GUI
so i have a file: MachineGun.js with a "static var bulletsLeft : int = 0;" and another file Bullets.js with this code attached to my Main Camera:
var i : int = MachineGun.bulletsLeft; var s : String = i.ToString(); function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20), s); }
And i want that this String s gets shown on my GUI, but it doesnt show. It works with normal Strings like String s = "blabla" but not with this code.
Why?
Comment
Answer by czebrose · Jun 27, 2012 at 01:25 PM
Have you tried adding Debug.Log(s) somewhere? see if it prints anything out.