Search Issue Tracker
Fixed in 5.1.0
Votes
33
Found in
5.0.0f4
Issue ID
677838
Regression
No
Cursor flickering in editor while playtesting if cursor.visible = false
Reproduction steps:
1. Open user submitted project "Test Cursor Locking"
2. Add user script "ScreenLockCursor.cs" to any object in the scene
3. Start playing and press "p" on the keyboard. The cursor should be locked and become invisible
4. Press random buttons on the keyboard, the cursor will flicker in the middle of the game window
5. If that doesn't work try setting editor layout to "4 Split" and turning off "Maximize on Play", then repeat steps 3 - 4
Notes:
1. This bug is only reproducible on Windows 7, we could not reproduce it on Windows 8.1
2. This bug only appears in editor, it does not affect a built game
3. Here is a video that shows the reproduction steps: http://screencast.com/t/ciOWKAh3Uygk
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
RV1
May 02, 2015 19:08
I'm getting this exact same issue on Windows 8.1 pro and 5.0.1f1. I have tried every suggestion out there and none of them work (such as setting visible/lockstate in OnGUI, using ForceSoftware, etc). This issue only occurs in play-in-editor, it does not occur in release builds. I also never experience this issue in Unity 4.x.
The Unity editor still processes input whilst the game is running (you can test this by pressing CTRL+S whilst the game is running and you will get an error). I suspect the flickering is caused by some editor code that is processed after all game script has executed which is firing Cursor.visible when any key input is processed, because it appears that editor is stealing focus of the cursor from the game.
Just one last thing I want to add. I can't believe Unity still haven't fixed this yet. I can find forum posts dating back to November 2014 reporting this issue. It's now almost six months on?? Fix it already!
alan-lawrance
Apr 28, 2015 20:25
Tried the suggested work-around of putting Cursor modification into OnGUI or LateUpdate, but both places didn't help my case (running Windows 7, in editor).
MasterTsif
Apr 23, 2015 18:54
Tested on 2 pcs with Win 8.1 and Unity 5.0.1 and still happens.
C Griffin
Apr 22, 2015 22:25
A workaround/solution/possible correct way:
Placed the code that edited Cursor.visible and Cursor.lockState into the OnGUI() function. All flicker is gone as well as position shifting... from what I can tell.
I imagine this is the correct way to implement these features. You could try LateUpdate() as well, but I have not attempted that as a fix.
C Griffin
Apr 22, 2015 20:42
I have issues with the cursor flickering, as well as the position of the cursor changing between two locations. Currently it will fluctuate between the center of the Game View and the center of the Inspector panel.
I wonder whether the flickering is caused by the cursor rendering on/off, or from the cursor alternating between positions and giving the appearance of flicker when it is actually visible the entire time, just in a different position.
Gua
Apr 16, 2015 13:38
I have same problem.
randomperson42
Apr 13, 2015 18:13
Same issue on Windows 8.1, Unity 5.0.1
chai
Apr 11, 2015 00:06
Same bug on windows7 here, only appears in editor
alan-lawrance
Apr 10, 2015 21:47
We just upgraded to Unity 5, and this stands out as a major annoyance when playing the game in the editor (when the cursor is supposed to be hidden).