My Cursor Won't Disappear

I have a script in my game that SHOULD make my mouse cursor disappear. Here’s he script…

function Start () {
    UnityEngine.Cursor.visible = false;
}

The thing is, it works in one scene, but not the other. There are no other scripts that should affect it, so what’s the matter?

If you have this attached to an empty in the first scene you had this script active and it worked, you will need it to have an empty in the next scene with the same script attached as well.

Scripts don’t carry over to different scenes automatically, your code is fine, so that’s the only thing I can think of.

1 Like