- Home /
Question by
blackshtormx · Oct 20, 2013 at 09:22 AM ·
gui-problemgui state
Unity 3d GUI text problem PLEASE HELP :|
Hello guys its again me, so i am new to unity3d but i know a bit of javaScript i've again one more question about GUI textSo there is my script i want make shooting counter so yeah, there is script: #pragma strict
var targetGuiText : GUIText;
var Ammo = 30;
function Update()
{
if (Input.GetMouseButtonDown(0))
{
Ammo -=1;
targetGuiText.text = Ammo;
}
}
Comment
Best Answer
Answer by YoungDeveloper · Oct 20, 2013 at 01:42 PM
targetGuiText.text = Ammo.ToString();
Probably this is the problem.
By the way, we are not mind readers, you must write/mention all possible information related to your problem. By this i mean:
*Say on what line the error is.
*Error itself
*How you have tried solving your own problem.
Your answer
Follow this Question
Related Questions
How to transform GUI Texture? 1 Answer
Timer With GUI 0 Answers
How to close multiple GUI Buttons and open other gui buttons 1 Answer
GUI follow gameobject 2 Answers
gui elements to clo 1 Answer