Hide the curser the moment i press play not having to press the play window
hi right now i have a curser hider script that has this line:
Cursor.lockState = CursorLockMode.Locked;
works perfectly, my only problem is after i press the play buttom and move to the game screen i have to press the game screen again to "focus" it and hide the curser i want to do this automatichly via script,any one knows of a way to do this? i can still move the mouse and key board and it reacts in game soo its kinda focused on that sense but i still have to click the window to hide the mouse
also i know of a way to focus the editor window but could not change it to focus the game window,its done like this:
UnityEditor.SceneView.FocusWindowIfItsOpen(typeof(UnityEditor.SceneView));
Comment