Example #1
0
 public static void ToggleCursorLock(bool flag)
 {
     if (!GameCursor.IsInstance())
     {
         Cursor.visible   = !flag;
         Cursor.lockState = flag ? CursorLockMode.Locked : CursorLockMode.None;
     }
     else
     {
         GameCursor.Instance.SetCursorLock(flag);
     }
 }
Example #2
0
 public static bool IsCursorLocked()
 {
     return(GameCursor.IsInstance() ? GameCursor.isLock : Cursor.lockState == CursorLockMode.Locked);
 }