Search Unity

Change Cursor.lockState so it's locked by default

Discussion in 'Getting Started' started by Wulthan, Dec 20, 2015.

  1. Wulthan

    Wulthan

    Joined:
    Dec 20, 2015
    Posts:
    1
    Hey guys,
    so I am using following Script to change the cursors state:
    http://docs.unity3d.com/ScriptReference/Cursor-lockState.html

    Question now is, how do I change the script so the cursor is locked by default instead of free ? Because when I am switching to a new level (scene) then I have to click the "Lock Cursor" button again which gets kind of annoying each level.