This is my small script,
function OnGUI()
{
if(GUI.Button(Rect(0, 0, 200, 100), "Clicke me"))
}
i get an error saying
Unexpected token: }.
on (4,1)
This is my small script,
function OnGUI()
{
if(GUI.Button(Rect(0, 0, 200, 100), "Clicke me"))
}
i get an error saying
Unexpected token: }.
on (4,1)
The if command normally needs { do something }. Example:
function OnGUI() {
if(GUI.Button(Rect(0, 0, 200, 100), "Clicke me")) {
Debug.Log("Button Clicked");
}
}
Maybe you wanna read my MonoDevelop tips: