Need to lock the mouse but not in middle - OCULUS RIFT

Hi, due to Oculus Rift, I need to lock the mouse but not in the middle, cause the middle, when you are using Oculus, is not the middle of the screen. Using Oculus you have 2 screens and I need to lock the cursor (or use another method) cause I’m using the Oculus tracker (with a drawed crosshair) to move the camera and trigger events. But the locked cursor is in the middle of the 2 Oculus screens and not matches with the crosshair (crosshair is well positioned). There’s the code I’m using:

// True if the menu is open and mouse is unlocked 
   var MenuOpen : boolean = false; 
   function Start () {
       Screen.showCursor = true;
   function Update() {
       // Check whether the menu button was released 
       if (Input.GetButtonUp("MenuOpen")) {
           MenuOpen = !MenuOpen;
   // Called each time the Gui needs to be drawn 
   function OnGUI () {
       if (!MenuOpen) {
           // Draw the crosshair 
           // Center the text inside the label 
           var centeredStyle ="Label");
           centeredStyle.alignment = TextAnchor.MiddleLeft;
           // Draw the label at the center of the screen 
           GUI.Label (Rect (Screen.width/4+60, Screen.height/2-25, 100, 50), "O", centeredStyle);
   function UpdateCursorLock() {
       Screen.lockCursor = !MenuOpen;
       Screen.showCursor = MenuOpen; 

I’m trying but I do not know what it is supposed to do. I do not know how to attach my functions

function OnMouseOver () {
delay += Time.deltaTime;
// here the 2 is the time that you want before load the bar
if(delay >=2)
plane.renderer.material.color =;
// buttom active >> load your scene
plane.renderer.material.color.g = delay/2;
// loading bar is increasing ( delay/2 * 100 = percentage of loading)
function OnMouseExit () {
delay = 0;
plane.renderer.material.color.g = 0.1;

with your code but I appreciate your effort and your help.