- Home /
Adding GUI to this
Hi. I watched a YouTube tutorial about random numbers. But I he didn't add any GUI text to it. I tried doing it myself, but failed. What I wanted was a button which you could press. When you pressed the button, you got a random number pops up on the screen.
Here is the script he made:
var randNumber : int;
function Update () {
if (Input.GetMouseButtonDown(0)) {
randNumber = Random.Range(1.0, 100.0);
Debug.Log (randNumber);
}
}
Answer by Sisso · Oct 08, 2013 at 02:38 PM
How can i make that GUI button thing that I wanted?
That is simple, you need first to study all the links below and I have sure that you will achieve it.
http://docs.unity3d.com/Documentation/Manual/index.html
http://docs.unity3d.com/Documentation/Manual/UserGuide.html
http://docs.unity3d.com/Documentation/Manual/GameInterfaceElements.html
http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html
Congratulations, you bothered answering an extremely posting guideline unfriendly question! have my thumbs-up.
Your answer
Follow this Question
Related Questions
Randomly generated number 0 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Setting Scroll View Width GUILayout 1 Answer
Random.Range Generating Assigned Value 1 Answer
Adding GUI to this 1 Answer