Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
0
Question by papamck · Apr 05, 2012 at 07:45 AM · mouseglowhoverover

make an object glow when mouse over

i have import an 3d object into the scene. and i want it has a bit glow or lighter when mouse over. how can i suppose to do it.

i check some of the similar answers but related to GUI what is GUI ?

thank for answering me

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by PetterDK · Apr 05, 2012 at 10:17 AM

GUI is an abbreviation of Graphical User Interface. The reason that other answers that you have found are related to GUI is that your question has direct relevance to GUI elements (in your case a button-like function).

What you are looking for is the function OnMouseOver(). Documentation can be found here. It explains how to use it, you just have to use code that accomplishes the effect that you want to have when the mouse is over the gameObject.

Comment
Add comment · Show 1 · 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 papamck · Apr 05, 2012 at 11:11 AM 0
Share

thanks for your answer and i can do the mouseover effect by using "void On$$anonymous$$ouseEnter() { renderer.material.color = Color.red;"

but i don't want it become red i want an outline so i find out that ToonShading.unityPackage can create a white outline of an object is there any way to use Toon by script?

PetterD$$anonymous$$ thank you for answering my questions so briefly.

avatar image
1

Answer by PetterDK · Apr 05, 2012 at 01:08 PM

My link was only for documentation so that you can see how it works. You will of course have to replace "`renderer.material.color = Color.red;`" with the effect that you want to have happen.

Unfortunately I can't help you with how to turn a shader on/off like that, but off the top of my head you might have to use a replacement shader. You can find documentation on that here: http://unity3d.com/support/documentation/Components/SL-ShaderReplacement.html.

No problem, just remember to upvote answers that you like and mark an answer as accepted..

Comment
Add comment · 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
0

Answer by papamck · Apr 05, 2012 at 12:38 PM

thanks for your answer and i can do the mouseover effect by using "void OnMouseEnter() { renderer.material.color = Color.red;"

but i don't want it become red i want an outline so i find out that ToonShading.unityPackage can create a white outline of an object is there any way to use Toon by script?

PetterDK thank you for answering my questions so briefly.

Comment
Add comment · Show 1 · 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 PetterDK · Apr 05, 2012 at 01:09 PM 0
Share

And please, do not write comments as answers.. You have already posted that exact same message as a comment.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

detect mouseover with grid buttons? 1 Answer

MouseOver Clarification Please 2 Answers

Change GUI on mouse over 1 Answer

GUIButton (outline) constant glowing/flashing? 1 Answer

How to implement glow when moused over? 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