|
Hi all, 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.
(comments are locked)
|
|
[edit] [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. This needs to be shown higher on this answer. The flickering DOES NOT happen on the build ONLY in the editor.
Apr 17 at 12:36 PM
fafase
(comments are locked)
|
Hi Joshua, Yes, I have tried just setting the Screen.showCursor = false with exactly the same result. Also have tried only setting these variables inside EngineHelper Pause and Resume methods rather than constantly setting each frame to try and resolve the issue. I also made sure that the EngineHelper.Paused flag is indeed true when I expect it to be. The strange thing is that all this worked perfectly until I updated from 3.0 to 3.3.
May 26 '11 at 07:52 AM
nathanp812
(comments are locked)
|
|
I had this same problem. My solution was that I had PlayMaker running with "control mouse cursor" checked. I unchecked it and it solved the problem. You may have a similar issue.
(comments are locked)
|
