I want change object color, when mouse cursor on object.
private void OnMouseEnter()
{
for (int i = 0; i < renderers.Length; i++)
{
renderers<em>.material.color = new Color(renderers<em>.material.color.r * coef, renderers<em>.material.color.g * coef, renderers_.material.color.b * coef);_</em></em></em>
}
}
private void OnMouseExit()
{
for (int i = 0; i < renderers.Length; i++)
{
renderers_.material = renderers*.sharedMaterial;
}
}*
When OnMouseEnter call, material color change, but when OnMouseExit call, nothing happens._