without using the raycast would like to achieve something like this:
When I click the left button of the mouse on a GameObject I would like something to happen, for example, I click on a cube, and it disappears. What is the script that I can accomplish this?
possibly in C #
You are looking for OnMouseDown():
using UnityEngine;
using System.Collections;
public class Click : MonoBehaviour {
void OnMouseDown() {
renderer.enabled = false;
}
}