Center Mouse and Turn Visibility Off - Unity3d

preview_player
Показать описание
Lock the Mouse Cursor To Center Of Screen In Unity and Turn off its visibility when the game starts or when you alt+tab out then re-enter back in the game.
(Unity version used in video 5.6.2f1)

Code Used In This Video:
public class MouseStateGameLoad : MonoBehaviour {

void Start()
{

}

void OnApplicationFocus(bool ApplicationIsBack)
{
if (ApplicationIsBack == true)
{
}
}

}
Рекомендации по теме
Комментарии
Автор

why I can't click the object, I can't use the left click mouse when i want to clck the object

prvrlhj
Автор

Thanks! But when I put this script its just like my pointer is disappeared, I found that it's locked to the center but I can't click in the game, do you know why? Also, even if I put "Cursor.visible = true" I cant see my cursor

Eckmuhl