cursorlockmode cannot be used as a method C# code example
Example: cursorlockmode cannot be used as a method C#
void Update() { //Mouse lock and confine Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; Cursor.lockState = CursorLockMode.Confined; //and to unlock it is this: Cursor.lockState = CursorLockMode.None; Cursor.visible = true; }