I wanted to check (and do stuff afterwards) when I tap on a specific item on my touchscreen. Basically, I check when I tap on its collider. So I noticed, that if I attach a script to that object and use OnMouseEnter(), its code is not only executed when I hover my mouse over this object inside Unity, but also when I build and run my game on my Android device and tap on my object.
I was looking for ways to do this, and they mentioned raycasting. My code is simpler though and it seems to work. Is there any reason why I shouldn’t use it?