A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/sprite/../../ScriptReference/Cursor-lockState.html below:

Unity - Scripting API: Cursor.lockState

Cursor.lockState Suggest a change Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close Your name Your email Suggestion*

Cancel

Description

Determines whether the hardware pointer is locked to the center of the view, constrained to the window, or not constrained at all.

A locked cursor is positioned in the center of the view and cannot be moved. The cursor is invisible in this state, regardless of the value of Cursor.visible. Note: Locking the cursor prevents the user from interacting with UI elements.

A confined cursor behaves normally, but it is confined to the view. For example, if the application is running in a window, the a confined cursor cannot leave that window. The confined cursor mode is only supported on Windows and Linux standalone builds.

The recommended best practice for a positive user experiences is to only to lock or confine the cursor because of a user's action, such as pressing a button.

The cursor state can be changed by the operating system or the Editor. For example, check the state of the cursor when the application regains focus or the state of a game changes to reveal a UI.

In the Editor, the cursor loses focus in Game mode when you press Escape or when you switch an application. In the Standalone Player, you have full control over the mouse cursor, but if you switch applications, the cursor goes out of focus.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4