hi! so i add this function to my object, and i'ts works but when mouse is not ower object color not reset back, so how can i reset color back to previous color ? function Start () { } function OnMouseOver () { transform.renderer.material.color = Color.yellow; }
Have a look at these: http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnMouseEnter.html http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnMouseExit.html
thanks 'Marrrk" this what i need, http://docs.unity3d.com/Documentatio...MouseExit.html but i hawe still question, in this function i must to set a collor of the end, but how can i just reset previous object color ?
Very simple, just store the old color into a member variable before changing it to Color.yellow and use this variable when resetting the color to its original state.
marrrk thank you for advice, but i still can't get previous object color end of this function are, white,red, e.tc. how can i put my own color ? or maybe are some option for simpple color restore ? please help