Version: 2021.3

Cursor

class in UnityEngine

切换到手册

描述

用于设置光标(鼠标指针)的光标 API。

支持 macOS、Windows 和 Linux 上的硬件光标。在不支持的平台上回退到软件光标。

Windows Store Apps: Supports only one hardware cursor, set via PlayerSettings.defaultCursor, cursors created at runtime using Cursor.SetCursor are treated as software cursors. Android and Chrome OS: Support custom hardware cursors on version 7.0 and later. There is no hardware or software custom cursor support before 7.0.

用作光标的纹理应在其导入设置中作此标记。

静态变量

lockState确定硬件指针是否锁定到视图的中心、受限于窗口或者根本不受限制。
visible确定硬件指针是否可见。

静态函数

SetCursor将鼠标光标设置为给定纹理。

Did you find this page useful? Please give it a rating: