prejudice to all,
I’m new on unity 3d’m making a game for Android
or a problem with the gui.button ie me is that when I give you a button at function so I would type example: onpressbutton can you tell me how? and please do not understand much being new to JavaScript so please explain it in a simple way
You can find something interesting here :
// unity function for GUI
function OnGUI() {
// you'r button is a rectangle, with position x =10, y = 10, width=50, height=50
//corner top-left is 0,0
if (GUI.Button(Rect(10,10,50,50),btnTexture))
{
//do something (when click on button), or call a function
myfunction();
}
}
function myfunction(){
//dosomething
}
UP .