Upload from upload_mods.ps1
This commit is contained in:
22
KFAttached/FPSPack/Demo/MouseLock.cs
Normal file
22
KFAttached/FPSPack/Demo/MouseLock.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class MouseLock : MonoBehaviour
|
||||
{
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
#if UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6
|
||||
Screen.lockCursor = true;
|
||||
#else
|
||||
Cursor.visible = false;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user