- Home /
how to make a main menu?
could somebody give me a guide in how make a simple 3d menu?
Answer by Mike Ledwards · Dec 25, 2010 at 11:51 AM
renderer.material.color = Color.black; var isQuitButton = false; var isPlay = false; var isLoad = false;
function OnMouseEnter() {
//Change the color of the text
renderer.material.color = Color.green;
//PlayAudio GetComponent(AudioSource).enabled = true;
}
function OnMouseExit() {
//Change the color of the text back
renderer.material.color = Color.black;
//KillAudio GetComponent(AudioSource).enabled = false;
}
function OnMouseUp() {
if( isQuitButton ) {
//quit the game Application.Quit();
} else if( isPlay ) {
//load level
Application.LoadLevel(1);
} if( isLoad ) {
//load level
Application.LoadLevel(0);
}
}
heres the script i use for exactly that'... attach to a 3dtext or whatever just make sure it has a box collider on it
Your answer
Follow this Question
Related Questions
Close GUI help. 1 Answer
Main Menu scrpit not working 1 Answer
how to make a main menu? 1 Answer
How To Make A Pause Menu? 1 Answer