Toggling the mouse/cursor

In order to toggle the mouse/cursor we use the CursorManager , You have to only call the .ShowCursor() method once! As its "Requesting" the cursor.

If you request it too many times you will have to hide it the same amount of time! So only call this when opening your menu and when closing it, don't call it each frame while your menu is open.

// Show the cursor :
CursorManager.Get().SetCursor(CursorManager.TYPE.Normal);
CursorManager.Get().ShowCursor(true, true);

// Hide the cursor :
CursorManager.Get().ShowCursor(false,false);

Last updated

Was this helpful?