using cursor.loockstate in unity code example
Example 1: unity mouse lock
Cursor.lockState = CursorLockMode.Locked;
Example 2: cursor lock mode
Cursor.lockState = CursorLockMode.Locked;
Cursor.lockState = CursorLockMode.Locked;
Cursor.lockState = CursorLockMode.Locked;