MIssing cursor in Windows Builds

Hey all,

I just completed a project where I had a large memory hungry scene that made extensive use of Screen.showCursor and .lockCursor and had a mixture of GUITexture/Text and the Unity 2.x GUI system. Everything worked beautifully on our Macs, but when I got to testing it on Windows the default mouse cursor would not respond to changes to showCursor and remained hidden from view after the first level load.

I created a test scene that simply toggled showCursor at regular 2 second intervals to see if it was a problem with showCursor, but that ran fine on Windows. I was at a loss as to what to try next . . .

In the end, since the project was due that night, I wrote up and created a custom cursor script and texture, which works but was not something I was expecting to have to do.

Has anyone else encountered this missing Windows cursor? Anyone know how to rectify it?

Thanks,
~Robert

No thoughts on this from anyone, huh?

did you test using another machine?.

Yes, two others.

In total I tested on 3 different machines running Windows XP Pro, and one of those machines again with Windows Vista Home Premium.

I am experiencing the same exact problem under Windows. Did you find out how to resolve the issue?

Nope, no solution so far . . . bump

I think there may be a solution. After playing around with Screen.showCursor and Screen.lockCursor under Windows, I found predictable behavior when the two flags are not mixed, as in the following example:

// This works predictably under Windows and OS X
Screen.showCursor = false;
// coroutines requiring hidden cursor
Screen.showCursor = true;

Screen.lockCursor = true;
// coroutines requiring locked cursor
Screen.lockCursor = false;

So, I think as long as we avoid things like the following script under Windows, things should be ok:

// This is bad in Windows, but ok under OS X
Screen.showCursor = false;
// optional coroutines here
Screen.lockCursor = true;
// some coroutines here
Screen.lockCursor = false; // Releases the cursor, but it remains hidden!
Screen.showCursor = true; // This does not reveal cursor!

Unfortunately, that precludes any FPS game.

Actually, Screen.lockCursor works well for FPS games. According to the Unity manual:

I tested it and this works for FPS games. The bottom line is basically that showCursor and lockCursor under Windows don’t mix for some reason :?

However, as I pointed out in my earlier post, there is a viable workaround with no significant drawbacks.

I’m having the same issue.

Hey guys, have any of you submitted a bug report on this?

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.

Yup, but I think it was a problem in '09

Closing.