Lockstate Untiy
Cursor.lockState = CursorLockMode.Locked;
Frail Flamingo
Cursor.lockState = CursorLockMode.Locked;
#if UNITY_EDITOR
if(Input.GetKeyDown(KeyCode.E))
#else
if(Input.GetKeyDown(KeyCode.Escape))
#endif
{
...