Hi everyone,
I am new in coding and unity in general. I am working on a simulation, scripted in c#.
I want that when the player mouses over a 3D object the edges of the 3D object Illuminate as a green or blue line (not that the color really matters in code). Is this possible to do? and if it is, how would I do that?
This is what I have now:
using UnityEngine;
using System.Collections;
public class myscript : MonoBehaviour {
private Color initialColor;
void Start()
{
initialColor = renderer.material.color;
}
void OnMouseOver ()
{
renderer.material.color = Color.green;
}
void OnMouseExit ()
{
renderer.material.color = initialColor;
}
}
It works but what happens with this code is that you just change the main color of the texture and that is not what I want.
Thank you in advance for your input!