using UnityEngine; public class CursorLock : MonoBehaviour { void Start() { Cursor.lockState = CursorLockMode.Locked; // Lock the cursor Cursor.visible = false; // Hide the cursor } }