I am trying to get button to load new scene when clicked but when I click anywhere it happens
Here is my code:
#pragmastrict
functionUpdate () {
if(Input.GetMouseButton(0))
Application.LoadLevel("TEST");
}
Please help
I am trying to get button to load new scene when clicked but when I click anywhere it happens
Here is my code:
#pragmastrict
functionUpdate () {
if(Input.GetMouseButton(0))
Application.LoadLevel("TEST");
}
Please help
function OnGUI(){
if(GUI.Button(new Rect(50, 50, 200, 40), “load new level”){
Application.LoadLevel(“TEST”);
}
}