Simple Main Menu using gamepad

I’m trying to make a very simple main menu that is gamepad compatible. I just want buttons for “start game” and “see controls” I have no idea how to go about doing this, I have read through other answers but none of them seem to help me.

This is what I have so far but its not for the GamePad… And I commented out the load level part otherwise the level just loads automatically…

var isQuitButton = false;

function OnMouseEnter()                                    
{	//change the color of the text
	renderer.material.color = Color.red;
}

function OnMouseExit()
{	//change the color of the text
	renderer.material.color = Color.white;
}


function OnMouseUp()
{
	//are we dealing with a quit button
	if( isQuitButton )
	{
		//quit the game
		Application.Quit();
	}
	else
	{
		//load level
		//Application.LoadLevel(1);
	}
}

Are you using the old GUI or the new UI attributes? If you are using the UI attributes, you want to make sure your button to run the function is the same to the function. Do this(in the editor) by finding your button, Click on it, find OnClick() and hit the plus button. Then add the Object that has the script attached to it and click add function-> Your Script → Function you want to run. It should work. If it doesn’t then I’ll try recreating your script into the use you want it to work.

For Start Buttons, create a UI Button, and name it start. Then in your script, add a function OnStartButtonClick() and add the function. Like so:

 var isQuitButton = false;
 
 function OnMouseEnter()                                    
 {    //change the color of the text
     renderer.material.color = Color.red;
 }
 
 function OnMouseExit()
 {    //change the color of the text
     renderer.material.color = Color.white;
 }
 
 
 function OnMouseUp()
 {
     //are we dealing with a quit button
     if( isQuitButton )
     {
         //quit the game
         Application.Quit();
     }
     else
     {
         //load level
         //Application.LoadLevel(1);
     }
     
}
 function OnStartButtonClick(){
   //Your Function
}

After you added your function, add the function to the button like the same you did with the quit button. Hope this helps. Again if it doesn’t, explain what you want and I’ll gladly do it for you.