Checking what mouse is pointing at

Hi,
I’d like to check what object my mouse is pointing at. I do not want to use the built-in OnMouseEnter function, it won’t work in my case. Would rather use raycasts or something similar. I can link camera as starting position for my raycast, but i don’t know how to find Vector3 position of my mouse.

Well you can use

Camera.ScreenPointToRay (Input.mousePosition);

This Generates a ray from mouse position in Game view.

More below