Hello everybody,
I want to lock my cursor to the middle of my screen but still have it visible.
Reason is, that in my game are lots of Buttons to click, therefore I want the Cursor visible all the time, to be able to click on UI-elements.
If I use
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = true;
the cursor is not visible (In Editor/Playmode but also after build/WebGL).
How is it possible to pin the cursor to the center but leave it visible?
Thanks!!
This is the navigation forum…not sure why you posting this here.
Also one search in the forum yielded this result. Please do not be so lazy next time. Thanks.
What i’m doing now is in the Update:
void Update ()
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.lockState = CursorLockMode.None;
}
But that make the cursor shaking/stuttering when moving the mouse around. And in unity 5.6.1f1 Personal the class Screen don’t have the property lockCursor.
Is there any other easy way to center and lock the mouse cursor ?