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
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
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.
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…
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.
And please, do not write comments as answers.. You have already posted that exact same message as a comment.
– PetterDK