Question by
heypro · Aug 15, 2016 at 02:54 PM ·
javascriptcodepage
A code prob. (java)
Hey. So I've made a game menu, but when I get my mouse on one of the buttons it doesn't get red, like I wanted to. And it doesn't work when you click on it. I'm a newbie on unity so don't judge me pls, it's my first expirience making a game. Here's the Javacode itself
// The menu itself, lol
var play = false;
var quit = false;
function onMouseEnter () {
play.GetComponent().material.color = Color.red;
}
function onMouseExit () {
play.GetComponent().material.color = Color.white;
}
function onMouseUp () {
if (play == true) {
Application.LoadLevel(1);
}
}
Comment
Your answer
