How do you find an object in the middle of the screen?

I am making(or learning to make one) a game and i need to find the object in the middle of the screen and the rotate an object(a bullet) in its direction. My question is how to find the object which will be in the middle of the screen ?

Hit a raycast from the middle of the camera and detect if it is in the middle.
This code may Help you.

function Update()
{
var x = Screen.width / 2;
var y = Screen.height / 2;

var ray = camera.ScreenPointToRay(Vector3(x, y, 0));
Debug.DrawRay(ray.origin, ray.direction * 1000, Color.yellow);

}