trouble with button in C#

Ok finaly figured out how to attach a script and draw a button…kinda. Im geting an error, and im using trial for now.

“CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected”

Usualy I dont ask people to tell me how to do this but this time I am.

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnGUI(){
	GUI.Button(Rect(16,16,32,16), "Button");
	}
}

You need to add the “new” keyword to your Rect :] You didn’t need it in javascript because it does it for you behind the scenes.

Change

Rect(16,16,32,16)

for:

new Rect(16,16,32,16)

i guess it may help if i program a script like i would in a MS C# Express program

actually, you can

yea i noticed that i was just refering to the syntax in general. how would i load a level/scene?

is this what you’re looking for?Application.LoadLevel("scene_name");
the scenes should be set in File/Build Settings before you can load them.

Cool thanks, and yes thats what i was looking for.