Hardware cursor not working in Standalone/Web

Hello,

I’m trying to get hardware cursors working in my game. I set the “Default Cursor” under “Player Settings” to a texture whose type is set to “Cursor”.

This works fine in the editor, but does not work in either standalone or webplayer builds. I’m testing on a Mac.

Is there something I’m missing that I need to do?

Thanks!

Walt

Is no one else having this issue?

Yeah I get this too… my work around was to use Cursor.SetCursor to set the cursor in script. This seems to work in the build.

The strange thing is, SetCursor isn’t working for me in the editor, and setting the cursor in Player Settings doesn’t work in the build, which is frustrating when I have code to change the cursor in game, but can only see it working when I do a build.

For me, using the hardware cursor works in Editor, but not in the WebPlayer.

In Editor:

1402282--72801--$cursor_in_editor.png

However, if I use the CursorMode.ForceSoftware mode, it works in WebPlayer (but is having the classic “software” lag).

I’m using:

Cursor.SetCursor(cursorTexture, hotSpot, cursorMode);

With Windows build I’m seeing a strange artifact:

1402282--72802--$cursor_windows.png

Just found the answer in another thread. ^^

The texture type of each texture used as a cursor must be set to “Cursor” via the texture importer. Now it works OK in both the WebPlayer and Windows builds.

ps. My cursor images reside in the Resources folder, so no problem with that.

2 Likes

with SetTextureSettings ?

No, in image properties.