Mouse cursor flickers/flashes when "hidden"

I made a search for answers but didn’t find anything helpful so here’s my problem:

I need to hide my mouse cursor during game levels. Naturally, I use the usual piece of code:

Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;

In the editor and when playing the final build (under Windows), the mouse just keep flashing/flickering. Needless to say it’s quite annoying. Tested under Windows 8/10 and developed with Unity 5.0.1 (not using recent version as it broke most of the game).

Any insights apart from using a transparent texture for the cursor?

Did you solved?

Please don’t necro-post. If you have a new question, make a new post. It’s FREE!!

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

This is the bare minimum of information to report:

  • what you want
  • what you tried
  • what you expected to happen
  • what actually happened, log output, variable values, and especially any errors you see
    - links to actual Unity3D documentation you used to cross-check your work (CRITICAL!!!)

The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379

  • Do not TALK about code without posting it.
  • Do NOT post unformatted code.
  • Do NOT retype code. Use copy/paste properly using code tags.
  • Do NOT post screenshots of code.
  • Do NOT post photographs of code.
  • Do NOT attach entire scripts to your post.
  • ONLY post the relevant code, and then refer to it in your discussion.