Locking the cursor in the center of the screen

I know this is asked various time. I need to be able to set my cursor at the center of the screen so that the camera can look at 3D text for my menu.

Basically I have a menu made up of 3D text and the camera has a mouse look script on it. I want the cursor in the middle of the screen so that when the GUI cursor (which is already at the center of the screen) activates the 3D text when an OnMouseEnter function is called.

If you need any more information just say.

Not sure if this is what you need…but.

This will reset and keep the mouse at the center of the screen every frame.

function Update()
{
   Screen.lockCursor = true;
   Screen.lockCursor = false;
}