Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by nini · Dec 09, 2010 at 10:43 AM · menumain

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

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Novodantis 1 · Dec 09, 2010 at 10:47 AM 0
Share

Still can't quite tell what the problem is. Should there be a roll-over state that changes the colour of the text?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nini · Dec 09, 2010 at 11:02 AM 0
Share

test it. it doesn't work to me.

avatar image oliver-jones · Dec 09, 2010 at 11:03 AM 0
Share

Are your menu items textures or texts?

avatar image nini · Dec 09, 2010 at 11:06 AM 0
Share

you mean the thing i want to make then change color? texts.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges