Answer by supernat
It's probably a misunderstanding of the compiler of what you really mean. It probably thinks you mean this: (( Input.GetKeyDown (KeyCode.R) && wasLocked) == false) It's good practice to...
View ArticleAnswer by Addyarb
Try this: if(Input.GetKeyDown(KeyCode.R)){ screenLock = !screenLock; } if(screenLock){ Screen.lockCursor = true; Screen.showCursor = false; } else{ Screen.lockCursor = false; Screen.showCursor = true; }
View ArticleAnswer by supernat
It's probably a misunderstanding of the compiler of what you really mean. It probably thinks you mean this: (( Input.GetKeyDown (KeyCode.R) && wasLocked) == false) It's good practice to...
View ArticleAnswer by Addyarb
Try this: if(Input.GetKeyDown(KeyCode.R)){ screenLock = !screenLock; } if(screenLock){ Screen.lockCursor = true; Screen.showCursor = false; } else{ Screen.lockCursor = false; Screen.showCursor = true; }
View Article