The following code used to work in Unity 3.0 without an issue:
But since updating to Unity 3.3 it no longer does. The mouse still locks and unlocks but the cursor flickers on and off.
I have checked in both editor and Windows 7 standalone / web player build with exactly the same result. There is nothing else in my project that is setting the mouse cursor other than this script.
Does anyone know if this is a bug? If so is there a work around?
Thanks in advance.
 [moved up from below] If I build&run the same project, it works perfectly -- no flicker. Problem seems to be only in Play from the Editor.
I've got the same problem with a nearly empty Unity project, nothing else running, on Windows7. Setting
I'm using a fake guiTexture for the cursor, and changing the texture on that, randomly as a test. Doing or not doing that doesn't seem to affect the flickering at all. Tried moving it across some other guiTextures -- flicker rate unchanged.
One thing that seems to increase flicker rate is Active/Inactive. I'm hiding certain other guiTextures when the cursor is over them, and this seems to reliably cause the "real" cursor to flash on. I move over the guiTexture, my code turns it inactive, and I get extra flickers of the real cursor for the next 1/2-second.
answered May 25 '11 at 04:00 AM