Setting hardware mouse cursor in UWP builds not working properly

When I begin my UWP program, the cursor appears in hardware mode. However, when I use the Cursor.SetCursor function to change the cursor’s texture, the cursor appears in software mode, even if I’ve set it to CursorMode.Auto. Oddly, if I set it back to my original cursor’s texture, it appears in hardware mode again.

I’d like for the cursor to remain in hardware mode consistently.

Has anyone run into this issue?

1 Like

Yeah, UWP doesn’t support dynamic hardware cursors. The only way to have hardware cursors is to pack your cursors at build time to win32 resource and then use this API to set it according to the resource id that you defined the cursor in the .rc file: Unity - Scripting API: WSA.Cursor.SetCustomCursor