Hi guys, I am doing messing around with some scripts ect and come across an issue with this script.
using UnityEngine;
using System.Collections;
public class hover : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnMouseEnter(){
renderer.enabled = false;
renderer.collider.enabled = false;
}
void OnMouseExit(){
renderer.enabled = true;
renderer.collider.enabled = true;
}
}
So all this does is kill the Mesh Renerer of a gameObject when the mouse enters it.
The issue is that when the mouse enters the gameObject the gameObject flashes on and off. its Strange, Is there a way to beat this?
Thanks.