private void OnMouseOver() {
Debug.Log("Hovering over GameObject");
}
GetComponent<Button>().onClick.AddListener(()=>print("clicked"));
using UnityEngine;
using System.Collections;
public class Click : MonoBehaviour {
public GameObject gameObjectToClick;
void OnClick(){
gameObjectToClick.SpecialFunction(); //call special function you wanted to call
}
}