I want to target button with the camera and, after loading bar, activate button

I’m working on Oculus Rift demo and I want to use the camera looking to push the buttons. I know that can use mouseover to this, but I want the user needs to look the button during a few seconds (loading bar) and only if the loading bar ends to load, the button is pushed. If the user make mouseOut the loading bar is cancelled and the button isn’t activate.

Best regards!

//if I uderstanded what you want, put this in your buttom:
function Start () {
renderer.material.color = Color.black;
}

function OnMouseOver () {
delay += Time.deltaTime;
if(delay >=2)
{
renderer.material.color = Color.green;
// buttom active
}
else
{
renderer.material.color.g = delay/2;
// loading bar
}
}
function OnMouseExit () {
delay = 0;
renderer.material.color.g = 0.1;
}