detect cursor press unity code example
Example 1: gameobject on click unity
private void OnMouseOver() {
Debug.Log("Hovering over GameObject");
}
Example 2: how to click a gameobject in unity
using UnityEngine.UI;
public Text text;
text.text = "new text";