Check out example codes for "how to lock and hide a cursor unity". It will help you in understanding the concepts better.

Code Example 1

//to lock in the centre of window
Cursor.lockState = CursorLockMode.Locked;
//to hide the curser
Cursor.visible = false;


Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;

Learn ReactJs, React Native from akashmittal.com