How do i lock my cursor and place it in the middle????

I am currently working on a game and how do i lock my cursor and how to lock and place the cursor in the middle of the scene view?

You could use Screen.lockCursor = true. We do this frequently in first person mode however there are some differences between editor mode and built mode. In editor mode lockCursor tends not to work great so we have to draw a small cursor artificially in development because the center gets out of sync and aiming clicks is nearly impossible otherwise. Locking works great in production... it hides the cursor and puts it in the center. You may want to consider a reticle in this case.

you dont need to lock it, just dont show it, this way you only need a GUI on the middle