private void Update() { if (this.LockCursor) { CursorLocking.Lock(); } else { CursorLocking.Unlock(); } CursorLocking.IsLocked = Compatibility.IsCursorLocked(); if (Input.GetKeyDown(this.LockKey)) { CursorLocking.Lock(); } if (Input.GetKeyDown(this.UnlockKey)) { CursorLocking.Unlock(); } if (Compatibility.IsCursorLocked()) { return; } Compatibility.SetCursorVisible(true); }