Hide Cursor?

Hey guys… So I used to know how to hide and lock the cursor.
However, now that unity updated their cusor class and states for it, etc.
I cannot get it to hide my mouse.

When i do:

Cursor.visible = false;

It will constantly flash my mouse. It doesn’t really hide it.
Anyone help me please?

Finally, something I can answer. This is what I’m using in my CamControl script.

void Start () {
        Cursor.visible = false;

It won’t hide the cursor when in playmode, but as soon as you build it and run, it should work.

Alright so you just posted the exact same code I posted…
So the real question here is: Why does it not make it invisible. It flashes my mouse? Does this not make your mouse flash or something? Mine flashes oddly…

1 Like

Sorry, in my excitement I totally missed that already posted the code. I really don’t know why its not working for you. Do you have any object to take the place of your mouse, or are you trying to go for a purely mouseless game? Does it flicker in playmode or when you build it?

Are you attempting to run the game from within the editor? Are you using any third-party assets like PlayMaker?

No edits or anything… However, when I build it, the mouse actually hides but in the editor it doesn’t hide hahaha weirdest thing ever but its okay because it works in the build game :stuck_out_tongue:

If I recall correctly the mouse cannot be made invisible within the editor. I asked about assets because some like PlayMaker will take control of the mouse and override instructions to hide it.

Ive had it work but cant look at how I did it right at the moment.
Makes trying work a big PITA though so it not really that desirable t have ihidden in the editor.