Version: 2018.1
Method group is Obsolete

Screen.lockCursor

マニュアルに切り替える
Obsolete public static bool lockCursor ;

説明

カーソルをロックするかどうか

カーソルが自動的に非表示になり、ビューの中心へ移動し、ビューから離れないようにされます。

After the user presses escape or switches to another application the cursor will be automatically unlocked. The cursor lock will also be lost when exiting full screen mode. You can query if the cursor is currently locked by checking the lockCursor state. To provide a good user experience it is recommended to only lock the cursor as a result of pressing a button. Also you should check if the cursor got unlocked, in order to e.g. pause the game or bring up a game menu. In the Editor the cursor will automatically be unlocked when you press escape. In the Standalone Player you have full control over mouse locking thus it won't automatically lose mouse lock unless you switch applications.

no example available in C#