need to follow the Unity GUI scripting guide:
For example, the following code will create a fully functional button from scratch:
function OnGUI () {
if (GUI.Button (Rect (10,10,150,100), "I am a button")) {
print ("You clicked the button!");
}
}
No comments:
Post a Comment