Rasagar/Assets/Viking Village/Scripts/MouseLock.cs

15 lines
231 B
C#
Raw Permalink Normal View History

2024-08-26 13:07:20 -07:00
using UnityEngine;
using System.Collections;
public class MouseLock : MonoBehaviour {
void OnApplicationFocus(bool status)
{
if (status)
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
}
}