Hi, This is a full script of mine :
var Guiscript : MyGui ;
function Update () {
if (Input.GetKeyDown ("escape")){
if (Guiscript.enabled == true){
Guiscript.enabled = false;
Screen.showCursor = false;
Screen.lockCursor = true;
}
else {
Guiscript.enabled = true;
Screen.showCursor = true;
Screen.lockCursor = false;
}
}
}
I used the Screen.lockCursor function in the script but I cant get the mouse to be locked in the game. I don't think theres any error in this script, is this some kind of bug? I'm using windows btw.