How can wire up the gui for the menu?

OK, I’m still new at this unity thing I am trying to wire up my GUI menu for my game and so far I don’t know how to link them up as if it were navigation bar of links, linking to another page of your website. Would there be a code to write in. Basically everytime I want to click on each of the items and go to the requested page of the video game screen; at least making them clickable. If anyone could help me with this situation that would be much appreciated?.. thanks.:face_with_spiral_eyes:

Hi, welcome to the forum!

You could use a set of buttons to do this. One approach is to use an array of button texts and another with corresponding scene names and render the buttons with a loop as in the following example:-

var topLeft: Vector2;
var buttonWidth: int;
var buttonHeight: int;
var buttonSpacing: int;

var texts: String[];
var sceneNames: String[];


function OnGUI() {
	for (i = 0; i < texts.Length; i++) {
		var xPos = topLeft.x + i * (buttonWidth + buttonSpacing);
		
		if (GUI.Button(Rect(xPos, topLeft.y, buttonWidth, buttonHeight), texts[i])) {
			Application.LoadLevel(sceneNames[i]);
		}
	}
}

The texts and sceneNames arrays should be the same length, the idea being that if you click on the first button then the first element of the sceneNames array will be used as the name of the scene to load, etc.