So I have this code attached to a Quad.
public class ShapeGrid : MonoBehaviour {
public GameObject[] shapes;
void Start(){
GameObject[,] shapeGrid = ne
Probably you have to add colliders to all of objects because OnMouse events are based on collisions. Here is detailed info: Unity Docs - OnMouseDown
Edit: after some talks we find out that the problem was caused by Instantiate method.
It's allways a better way to fill all of parameters in Instantiate method e.g
Instantiate(prefab, Vector3.zero, Quaternion.Identity)
if you want, you could change any of these parameters after instantiating object.
There are plenty of possible reasons.
If nothing of this doesn't help you should implement IPointerDownHandler interface and use it instead of OnMouseDown.