I can second this, probably just need to set 'Cursor.lockState = CursorLockMode.Confined' in a start function somewhere, then set 'Cursor.lockState = CursorLockMode.None' when the menu is opened, then reset to Confined when the menu is closed. (Confined only works on linux and windows)