Version: 2022.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 ChromeOS: Support custom hardware cursors on version 7.0 and later. There is no hardware or software custom cursor support before 7.0.

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

静态变量

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

静态函数

SetCursorSets a custom cursor to use as your cursor.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961