- Home /
how to make a main menu?
yesterday i asked who to make a main menu and someone gave me this link: http://www.youtube.com/watch?v=8Q5y7pHWdlo&feature=fvw and i followed this video and made a main menu but when i was needed to use this script: function onMouseEnter() { //change the color of the text renderer.material. color=Color.green; }
function onMouseExit() { //change the color of the text renderer.material. color=Color.white; }
it wasn't work why? video to my problom: http://www.youtube.com/watch?v=jDEFAETA3hQ
Still can't quite tell what the problem is. Should there be a roll-over state that changes the colour of the text?
Answer by oliver-jones · Dec 09, 2010 at 10:51 AM
I'm not really sure what your problem is? With the small snippet of script you gave us, it looks like you are having a problem with a roll over state? Trying to change the colour when you roll over with the mouse?
Try doing something like this:
var Text : Texture2D
function onMouseEnter(){ Text.renderer.material.color = Color.green; }
I do not have Unity in front of me, so I cannot test. But its something you might want to do.
(PS - please place your code in code format - it looks ugly, and off putting if you don't)
Your answer
Follow this Question
Related Questions
script to save and load a game 3 Answers
Loading multiple levels error 0 Answers
Main Menu Button Help! 1 Answer
GUILayout.TextField doesn't accept inputs 1 Answer
How do I make music continue through certain scenes 1 Answer