StellarXipher/Assets/Scripts/CursorLock.cs

11 lines
213 B
C#

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