unlock cursor unity code example
Example 1: unity mouse lock
Cursor.lockState = CursorLockMode.Locked;
Example 2: how to unlock cursor in unity
Cursor.lockState = CursorLockMode.None; // to unlock cursor
Cursor.visible = true; // to make cursor visible