Clicking in game view with cross-hair doesn't work

Do I need extra code for the clicking to work when I have a cross-hair? I have to constantly build and run to test something because when I click an object (in game view)it doesn’t click the object.

When I build and run it and set up my native resolution it does click the object. For testing purposes how can I continue making my game and have a crosshair? The reason why I need a cross-hair is because the mouse is all messed up. I also had to lock the mouse on every frame to make the mouse go away… This is nuts.

You need to Raycast the position into the scene to see what you hit. Your crosshairs are always locked at the center of the screen, so here is a snippet of untested code:

Vector2 v2ScreenCenter = new Vector2(Screen.width / 2, Screen.width / 2);
Ray ray = Camera.mainCamera.ScreenPointToRay (v2ScreenCenter);
RaycastHit hit;
		
if (Physics.Raycast (ray, out hit))
{
    Destroy(hit.collider.gameObject);
}

This code destroys the game object. Replace with whatever you want to do on a hit. v2ScreenCenter only needs to be initialized once.