Rasagar/Assets/Viking Village/Scripts/MouseLock.cs
2024-08-26 23:07:20 +03:00

15 lines
231 B
C#

using UnityEngine;
using System.Collections;
public class MouseLock : MonoBehaviour {
void OnApplicationFocus(bool status)
{
if (status)
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
}
}