For the cursor thing, have you tried https://docs.unity3d.com/ScriptReference/Cursor-lockState.html ? That might be helpful